Skip to content

Commit

Permalink
ARTESCA-13970 // Migration to React 18
Browse files Browse the repository at this point in the history
  • Loading branch information
hervedombya committed Nov 19, 2024
1 parent a471292 commit c79b7b5
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 71 deletions.
143 changes: 81 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/theming": "^8.3.6",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/react": "^15.0.7",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.0",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/react-table": "^7.7.11",
Expand Down Expand Up @@ -109,9 +109,9 @@
"framer-motion": "^4.1.17",
"polished": "3.4.1",
"pretty-bytes": "^5.6.0",
"react": "^17.0.2",
"react": "^18.3.1",
"react-debounce-input": "3.2.2",
"react-dom": "^17.0.2",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.49.2",
"react-query": "^3.34.0",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/inputlist/InputList.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Input } from '../inputv2/inputv2';
import { AddButton, SubButton } from './InputButtons';

export type InputListProps<T> = Omit<HTMLProps<HTMLInputElement>, 'size'> & {
ref: RefCallBack;
ref?: RefCallBack;
min?: string | number;
max?: string | number;
maxLength?: number;
Expand Down
4 changes: 3 additions & 1 deletion src/lib/components/tablev2/TableCommon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ type VirtualizedRowsType<
DATA_ROW extends Record<string, unknown> = Record<string, unknown>,
> = {
rows: Row<DATA_ROW>[];
RenderRow: ComponentType<ListChildComponentProps<Row<DATA_ROW>[]>>;
RenderRow: ComponentType<
React.PropsWithChildren<ListChildComponentProps<Row<DATA_ROW>[]>>
>;
rowHeight: TableHeightKeyType;
setHasScrollbar: React.Dispatch<React.SetStateAction<boolean>>;
hasScrollbar?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/toast/ToastProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const ToastContext = createContext<ToastContextType | undefined>(
interface ToastProviderProps {
children: ReactNode;
}
export const ToastProvider: React.FC<ToastProviderProps> = ({ children }) => {
export const ToastProvider: React.FC<React.PropsWithChildren<ToastProviderProps>> = ({ children }) => {
const [toastProps, setToastProps] = useState<ToastContextState | null>(null);

const showToast = (toastProps: ToastContextState) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export function AttachmentConfirmationModal<
resourceName: string;
resourceType: RESOURCE_TYPE;
redirectUrl: string;
EntityIcon: ComponentType<{ type: ENTITY_TYPE | RESOURCE_TYPE }>;
EntityIcon: ComponentType<
React.PropsWithChildren<{ type: ENTITY_TYPE | RESOURCE_TYPE }>
>;
cancelButtonDisabled?: boolean;
onCancel?: () => void;
onExit?: (
Expand Down

0 comments on commit c79b7b5

Please sign in to comment.