Skip to content

Commit

Permalink
fixup imports more
Browse files Browse the repository at this point in the history
    npx react-codemod update-react-imports
    npm run prettier
  • Loading branch information
himdel committed Dec 13, 2024
1 parent 08654b1 commit 796c348
Show file tree
Hide file tree
Showing 57 changed files with 2 additions and 66 deletions.
1 change: 0 additions & 1 deletion src/actions/ansible-remote-delete.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import { AnsibleRemoteAPI } from 'src/api';
import { DeleteAnsibleRemoteModal } from 'src/components';
import { canDeleteAnsibleRemote } from 'src/permissions';
Expand Down
1 change: 0 additions & 1 deletion src/actions/ansible-repository-copy.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import { getRepoURL, repositoryBasePath } from 'src/utilities';
import { Action } from './action';

Expand Down
1 change: 0 additions & 1 deletion src/actions/ansible-repository-delete.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import { AnsibleDistributionAPI, AnsibleRepositoryAPI } from 'src/api';
import { DeleteAnsibleRepositoryModal } from 'src/components';
import { canDeleteAnsibleRepository } from 'src/permissions';
Expand Down
1 change: 0 additions & 1 deletion src/components/approve-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import {
AnsibleRepositoryAPI,
type CollectionVersionSearch,
Expand Down
1 change: 0 additions & 1 deletion src/components/breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { BreadcrumbItem } from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
import { Breadcrumb } from 'src/components';

Expand Down
1 change: 0 additions & 1 deletion src/components/collection-content-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Toolbar, ToolbarGroup, ToolbarItem } from '@patternfly/react-core';
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
import cx from 'classnames';
import React from 'react';
import { Link } from 'react-router-dom';
import { type CollectionVersionSearch, type ContentSummaryType } from 'src/api';
import { EmptyStateCustom, SearchInput } from 'src/components';
Expand Down
1 change: 0 additions & 1 deletion src/components/collection-dependencies-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { List, ListItem } from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
import { type CollectionVersion, type CollectionVersionSearch } from 'src/api';
import { EmptyStateNoData, HelpButton } from 'src/components';
Expand Down
1 change: 0 additions & 1 deletion src/components/collection-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { DropdownItem } from '@patternfly/react-core/deprecated';
import React from 'react';
import { StatefulDropdown } from 'src/components';
import { useHubContext } from 'src/loaders/app-context';
import { DeleteCollectionUtils } from 'src/utilities';
Expand Down
1 change: 0 additions & 1 deletion src/components/collection-usedby-dependencies-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { Table, Tbody, Td, Tr } from '@patternfly/react-table';
import React from 'react';
import { Link } from 'react-router-dom';
import { type CollectionUsedByDependencies } from 'src/api';
import {
Expand Down
1 change: 0 additions & 1 deletion src/components/copy-collection-to-repository-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import {
AnsibleRepositoryAPI,
type CollectionVersionSearch,
Expand Down
1 change: 0 additions & 1 deletion src/components/copy-url.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import { ClipboardCopy } from 'src/components';

export const CopyURL = ({
Expand Down
1 change: 0 additions & 1 deletion src/components/date-component.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DateTime } from 'luxon';
import React from 'react';
import { Tooltip } from 'src/components';
import { language as locale } from 'src/l10n';

Expand Down
1 change: 0 additions & 1 deletion src/components/delete-collection-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Checkbox, Text } from '@patternfly/react-core';
import React from 'react';
import { type CollectionVersionSearch } from 'src/api';
import { DeleteModal } from 'src/components';

Expand Down
1 change: 0 additions & 1 deletion src/components/delete-group-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { List, ListItem } from '@patternfly/react-core';
import React from 'react';
import { type UserType } from 'src/api';
import { Alert, DeleteModal, Spinner } from 'src/components';

Expand Down
1 change: 0 additions & 1 deletion src/components/deprecated-tag.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';

export const DeprecatedTag = () => (
<div
Expand Down
1 change: 0 additions & 1 deletion src/components/download-count.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
import React from 'react';
import { Tooltip } from 'src/components';
import { language } from 'src/l10n';

Expand Down
6 changes: 1 addition & 5 deletions src/components/empty-state-custom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ import {
EmptyStateIcon,
EmptyStateVariant,
} from '@patternfly/react-core';
import {
type ComponentClass,
type ReactElement,
type ReactNode,
} from 'react';
import { type ComponentClass, type ReactElement, type ReactNode } from 'react';

interface IProps {
icon?: ComponentClass;
Expand Down
1 change: 0 additions & 1 deletion src/components/empty-state-filter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Button } from '@patternfly/react-core';
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
import React from 'react';
import { EmptyStateCustom } from 'src/components';

interface IProps {
Expand Down
1 change: 0 additions & 1 deletion src/components/empty-state-unauthorized.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import LockIcon from '@patternfly/react-icons/dist/esm/icons/lock-icon';
import React from 'react';
import { EmptyStateCustom, LoginLink } from 'src/components';

export const EmptyStateUnauthorized = () => {
Expand Down
1 change: 0 additions & 1 deletion src/components/hub-pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { PaginationVariant } from '@patternfly/react-core';
import React from 'react';
import { Pagination } from 'src/components';
import { ParamHelper } from 'src/utilities';

Expand Down
1 change: 0 additions & 1 deletion src/components/language-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
DropdownItem,
DropdownSeparator,
} from '@patternfly/react-core/deprecated';
import React from 'react';
import { StatefulDropdown } from 'src/components';
import { availableLanguages, language, languageNames } from 'src/l10n';

Expand Down
1 change: 0 additions & 1 deletion src/components/loading-page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Skeleton, Title } from '@patternfly/react-core';
import React from 'react';
import { LoadingSpinner, Main } from 'src/components';

export const LoadingPage = (_props) => (
Expand Down
1 change: 0 additions & 1 deletion src/components/loading-spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Bullseye } from '@patternfly/react-core';
import React from 'react';
import { Spinner } from 'src/components';

export const LoadingSpinner = () => (
Expand Down
1 change: 0 additions & 1 deletion src/components/login-link.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import { Link, useLocation } from 'react-router-dom';
import { useHubContext } from 'src/loaders/app-context';
import { Paths, formatPath } from 'src/paths';
Expand Down
1 change: 0 additions & 1 deletion src/components/markdown-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { Form, FormGroup, TextArea } from '@patternfly/react-core';
import React from 'react';
import ReactMarkdown from 'react-markdown';
import { FormFieldHelper } from 'src/components';
import './markdown-editor.scss';
Expand Down
1 change: 0 additions & 1 deletion src/components/namespace-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
CardTitle,
} from '@patternfly/react-core';
import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
import React from 'react';
import { Link } from 'react-router-dom';
import { Logo, Tooltip } from 'src/components';
import { Paths, formatPath } from 'src/paths';
Expand Down
1 change: 0 additions & 1 deletion src/components/namespace-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { t } from '@lingui/core/macro';
import { Form, FormGroup, TextArea, TextInput } from '@patternfly/react-core';
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
import React from 'react';
import { type NamespaceType } from 'src/api';
import { FormFieldHelper, Icon, NamespaceCard } from 'src/components';
import { type ErrorMessagesType, validateURLHelper } from 'src/utilities';
Expand Down
1 change: 0 additions & 1 deletion src/components/namespace-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
DataListItemCells,
DataListItemRow,
} from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
import { Logo } from 'src/components';
import { Paths, formatPath } from 'src/paths';
Expand Down
1 change: 0 additions & 1 deletion src/components/numeric-label.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { plural } from '@lingui/core/macro';
import React from 'react';

interface IProps {
number: number;
Expand Down
1 change: 0 additions & 1 deletion src/components/patternfly-wrappers/l10n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
type SearchInputProps,
type SpinnerProps,
} from '@patternfly/react-core';
import React from 'react';
import { LabelGroup as PFLabelGroup } from './label-group';
import { LoginForm as PFLoginForm } from './login-form';

Expand Down
1 change: 0 additions & 1 deletion src/components/permission-categories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { Flex, FlexItem } from '@patternfly/react-core';
import React from 'react';
import { type ModelPermissionsType } from 'src/api';
import { PermissionChipSelector } from 'src/components';
import { useHubContext } from 'src/loaders/app-context';
Expand Down
1 change: 0 additions & 1 deletion src/components/provider-link.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Trans } from '@lingui/react/macro';
import { Text, TextContent, TextVariants } from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';

interface IProps {
Expand Down
1 change: 0 additions & 1 deletion src/components/pulp-labels.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { Label } from '@patternfly/react-core';
import React from 'react';
import { LabelGroup } from 'src/components';

export const PulpLabels = ({ labels }: { labels: Record<string, string> }) => {
Expand Down
7 changes: 1 addition & 6 deletions src/components/render-plugin-doc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Table, Tbody, Td, Th, Tr } from '@patternfly/react-table';
import { dom, parse } from 'antsibull-docs';
import {
Component,
Fragment,
type ReactElement,
type ReactNode,
} from 'react';
import { Component, Fragment, type ReactElement, type ReactNode } from 'react';
import {
type PluginContentType,
type PluginDoc,
Expand Down
1 change: 0 additions & 1 deletion src/components/repository-badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
TextContent,
TextVariants,
} from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
import { useHubContext } from 'src/loaders/app-context';
import { Paths, formatPath } from 'src/paths';
Expand Down
1 change: 0 additions & 1 deletion src/components/resources-form.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import { type NamespaceType } from 'src/api';
import { MarkdownEditor } from 'src/components';
import './namespace-form.scss';
Expand Down
1 change: 0 additions & 1 deletion src/components/role-header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { BaseHeader, type BreadcrumbType, Breadcrumbs } from 'src/components';

interface IProps {
Expand Down
1 change: 0 additions & 1 deletion src/components/role-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
DataListItemCells,
DataListItemRow,
} from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
import { type LegacyRoleDetailType } from 'src/api';
import {
Expand Down
1 change: 0 additions & 1 deletion src/components/role-namespace-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
DataListItemRow,
} from '@patternfly/react-core';
import { DropdownItem } from '@patternfly/react-core/deprecated';
import React from 'react';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import { type LegacyNamespaceDetailType } from 'src/api';
import { Logo, StatefulDropdown } from 'src/components';
Expand Down
1 change: 0 additions & 1 deletion src/components/sha-label.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Label } from '@patternfly/react-core';
import React from 'react';
import { Tooltip } from 'src/components';
import { truncateSha } from 'src/utilities';

Expand Down
1 change: 0 additions & 1 deletion src/components/small-logo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import SmallLogoImage from 'static/images/logo_small.svg';

interface IProps {
Expand Down
1 change: 0 additions & 1 deletion src/components/sort-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import ArrowsAltVIcon from '@patternfly/react-icons/dist/esm/icons/arrows-alt-v-
import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon';
import LongArrowAltUpIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-up-icon';
import { Th, Thead, Tr } from '@patternfly/react-table';
import React from 'react';
import { ParamHelper } from 'src/utilities';
import './sort-table.scss';

Expand Down
1 change: 0 additions & 1 deletion src/components/tag-label.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Label } from '@patternfly/react-core';
import TagIcon from '@patternfly/react-icons/dist/esm/icons/tag-icon';
import React from 'react';

interface IProps {
tag: string;
Expand Down
1 change: 0 additions & 1 deletion src/components/tag.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Label } from '@patternfly/react-core';
import React from 'react';

interface IProps {
/** Value to display in the tag */
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-remote/detail.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import {
ansibleRemoteDeleteAction,
ansibleRemoteDownloadCAAction,
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-remote/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import { AnsibleRemoteAPI, type AnsibleRemoteType } from 'src/api';
import { Page, RemoteForm } from 'src/components';
import { Paths, formatPath } from 'src/paths';
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-remote/list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { msg, t } from '@lingui/core/macro';
import { Td, Tr } from '@patternfly/react-table';
import React from 'react';
import { Link } from 'react-router-dom';
import {
ansibleRemoteCreateAction,
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-remote/tab-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
CodeBlockAction,
CodeBlockCode,
} from '@patternfly/react-core';
import React from 'react';
import { type AnsibleRemoteType } from 'src/api';
import {
CopyURL,
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-repository/detail.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { msg, t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
import React from 'react';
import { Navigate } from 'react-router-dom';
import {
ansibleRepositoryCopyAction,
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-repository/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import {
AnsibleDistributionAPI,
AnsibleRepositoryAPI,
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-repository/list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { msg, t } from '@lingui/core/macro';
import { Td, Tr } from '@patternfly/react-table';
import React from 'react';
import { Link } from 'react-router-dom';
import {
ansibleRepositoryCopyAction,
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-repository/tab-details.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import { Link } from 'react-router-dom';
import { type AnsibleRemoteType, type AnsibleRepositoryType } from 'src/api';
import {
Expand Down
1 change: 0 additions & 1 deletion src/containers/ansible-repository/tab-distributions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { Td, Tr } from '@patternfly/react-table';
import React from 'react';
import { AnsibleDistributionAPI, type AnsibleRepositoryType } from 'src/api';
import { ClipboardCopy, DateComponent, DetailList } from 'src/components';
import { getRepoURL } from 'src/utilities';
Expand Down
1 change: 0 additions & 1 deletion src/containers/not-found/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { Bullseye } from '@patternfly/react-core';
import React from 'react';
import { BaseHeader, Main } from 'src/components';
import { withRouter } from 'src/utilities';
import NotFoundImage from 'static/images/not_found.svg';
Expand Down
1 change: 0 additions & 1 deletion src/utilities/fail-alerts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import { LoginLink } from 'src/components';
import { mapErrorMessages } from './map-error-messages';

Expand Down
1 change: 0 additions & 1 deletion src/utilities/last-sync-task.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { DateComponent, HelpButton, StatusIndicator } from 'src/components';

export function lastSynced(entity) {
Expand Down
1 change: 0 additions & 1 deletion src/utilities/with-router.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { useLocation, useNavigate, useParams } from 'react-router-dom';

// compatibility layer between react-router v6 and class components
Expand Down

0 comments on commit 796c348

Please sign in to comment.