Skip to content

Commit

Permalink
refactor: update imports across multiple components to include JSX fo…
Browse files Browse the repository at this point in the history
…r improved type support and consistency in the application
  • Loading branch information
hervedombya committed Jan 15, 2025
1 parent 6d473a5 commit 6b13159
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/react/account/AwsPaginatedResourceTable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeEvent } from 'react';
import { ChangeEvent, JSX } from 'react';
import { useLocation } from 'react-router';
import { SearchInput, Tooltip, Wrap, spacing } from '@scality/core-ui';
import { Box, Table } from '@scality/core-ui/dist/next';
Expand Down
1 change: 1 addition & 0 deletions src/react/databrowser/objects/ObjectDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useLocation } from 'react-router';
import { useQueryParams } from '../../utils/hooks';
import { useSelector } from 'react-redux';
import { Tabs } from '@scality/core-ui/dist/next';
import { JSX } from 'react';

export const MULTIPLE_ITEMS_SELECTED_MESSAGE = 'Multiple items selected';
export const SELECT_AN_OBJECT_MESSAGE = 'Select an object';
Expand Down
2 changes: 1 addition & 1 deletion src/react/locations/LocationDetails/LocationDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
LocationDetails as LocationFormDetails,
LocationTypeKey,
} from '../../../types/config';
import React from 'react';
import React, { JSX } from 'react';
import { Tooltip, Icon } from '@scality/core-ui';
import { storageOptions } from './storageOptions';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { useAccountLatestUsedCapacity, useListAccounts } from './accounts';
import { PromiseResult } from '../entities/promise';
import { STORAGE_ACCOUNT_OWNER_ROLE } from '../../../utils/hooks';
import { NewWrapper } from '../../../utils/testUtil';
import { JSX } from 'react';

const CREATION_DATE = '2023-03-27T12:58:13.000Z';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createContext, useContext } from 'react';
import { IAccessibleAccounts } from '../adapters/accessible-accounts/IAccessibleAccounts';
import { IAMPensieveAccessibleAccounts } from '../adapters/accessible-accounts/IAMPensieveAccessibleAccounts';
import { useAccountsLocationsEndpointsAdapter } from './AccountsLocationsEndpointsAdapterProvider';
import { JSX } from 'react';

const _AccessibleAccountsAdapterContext = createContext<null | {
accessibleAccountsAdapter: IAccessibleAccounts;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { createContext, useContext } from 'react';
import { createContext, useContext, JSX } from 'react';
import { IAccountsLocationsEndpointsAdapter } from '../adapters/accounts-locations/IAccountsLocationsEndpointsBundledAdapter';
import { PensieveAccountsLocationsAdapter } from '../adapters/accounts-locations/PensieveAccountsLocationsAdapter';
import { useInstanceId } from './AuthProvider';
import { useConfig } from './ConfigProvider';
import { useShellHooks } from '../../ShellHooksContext';

const _AccountsLocationsEndpointsAdapterContext = createContext<null | {
accountsLocationsEndpointsAdapter: IAccountsLocationsEndpointsAdapter;
}>(null);
Expand Down
2 changes: 1 addition & 1 deletion src/react/next-architecture/ui/AlertProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { JSX } from 'react';
import {
Alert,
FilterLabels,
Expand Down
2 changes: 1 addition & 1 deletion src/react/next-architecture/ui/LocationAdapterProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContext, useContext } from 'react';
import { createContext, useContext, JSX } from 'react';
import { ILocationsAdapter } from '../adapters/accounts-locations/ILocationsAdapter';
import { PensieveAccountsLocationsAdapter } from '../adapters/accounts-locations/PensieveAccountsLocationsAdapter';
import { useInstanceId } from './AuthProvider';
Expand Down
1 change: 1 addition & 0 deletions src/react/ui-elements/EntityHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TextBadge } from './TextBadge';
import { Icon, Stack } from '@scality/core-ui';
import styled from 'styled-components';
import { fontSize } from '@scality/core-ui/dist/style/theme';
import { JSX } from 'react';
type Props = {
icon: JSX.Element;
headTitle: string;
Expand Down
1 change: 1 addition & 0 deletions src/react/ui-elements/ErrorHandlerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { AppState } from '../../types/state';
import { clearError } from '../actions';
import { CustomModal as Modal } from './Modal';
import { JSX } from 'react';

const ErrorHandlerModal = () => {
const showError = useSelector(
Expand Down
2 changes: 1 addition & 1 deletion src/react/ui-elements/FormLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SmallerText,
} from '@scality/core-ui/dist/components/text/Text.component';
import { Select as BasicSelect } from '@scality/core-ui/dist/next';
import { HTMLAttributes, LabelHTMLAttributes, ReactNode } from 'react';
import { HTMLAttributes, LabelHTMLAttributes, ReactNode, JSX } from 'react';
import styled, { CSSProperties, css } from 'styled-components';
import { IconQuestionCircle } from './Icons';
import { default as BasicInput } from './Input';
Expand Down
2 changes: 1 addition & 1 deletion src/react/ui-elements/Hide.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import { useState, JSX } from 'react';
import MiddleEllipsis from './MiddleEllipsis';
import { spacing } from '@scality/core-ui/dist/style/theme';
import styled from 'styled-components';
Expand Down
1 change: 1 addition & 0 deletions src/react/ui-elements/Veeam/VeeamSkipModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Modal, Stack, Wrap } from '@scality/core-ui';
import { Button } from '@scality/core-ui/dist/components/buttonv2/Buttonv2.component';
import styled from 'styled-components';
import { JSX } from 'react';

type VeeamSkipModalProps = {
isOpen: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/react/utils/testMultipleHooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
waitForOptions,
} from '@testing-library/react';
import { WaitFor } from '@testing-library/react-hooks';
import { useState, useEffect } from 'react';
import { useState, useEffect, JSX } from 'react';
import { act } from 'react-dom/test-utils';
import { ErrorBoundary } from 'react-error-boundary';

Expand Down
2 changes: 1 addition & 1 deletion src/react/utils/testUtil.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropsWithChildren, ReactNode } from 'react';
import { PropsWithChildren, ReactNode, JSX } from 'react';
import { QueryClient, setLogger, useMutation } from 'react-query';
import { Provider } from 'react-redux';
import { MemoryRouter, Route, Routes } from 'react-router';
Expand Down
2 changes: 1 addition & 1 deletion src/react/workflow/SourceBucketOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useLocationAndStorageInfos } from '../next-architecture/domain/business
import { useAccountsLocationsEndpointsAdapter } from '../next-architecture/ui/AccountsLocationsEndpointsAdapterProvider';
import { BUCKET_TAG_VEEAM_APPLICATION } from '../ui-elements/Veeam/VeeamConstants';
import { Loader, useToast } from '@scality/core-ui';
import { useEffect } from 'react';
import { useEffect, JSX } from 'react';

type DisableOptionProps = {
disableOption?: (obj: {
Expand Down
2 changes: 1 addition & 1 deletion src/react/workflow/WorkflowList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConstrainedText, Icon } from '@scality/core-ui';
import { Button, Table } from '@scality/core-ui/dist/next';
import { useCallback } from 'react';
import { useCallback, JSX } from 'react';
import { CoreUIColumn, Row } from 'react-table';
import { useTheme } from 'styled-components';
import { Workflows } from '../../types/workflow';
Expand Down

0 comments on commit 6b13159

Please sign in to comment.