Skip to content

Commit d9f0ed5

Browse files
committed
chore(deps): update to react v19 and fix some issues
1 parent b17cc23 commit d9f0ed5

File tree

7 files changed

+363
-367
lines changed

7 files changed

+363
-367
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"@types/node": "22.9.0",
6565
"@types/plotly.js-basic-dist": "1.54.4",
6666
"@types/prismjs": "1.26.5",
67-
"@types/react": "18.3.18",
67+
"@types/react": "19.0.2",
6868
"@types/react-plotly.js": "2.6.3",
6969
"axios": "1.7.9",
7070
"dayjs": "1.11.13",
@@ -90,8 +90,8 @@
9090
"notistack": "3.0.1",
9191
"plotly.js-basic-dist": "2.35.3",
9292
"prismjs": "1.29.0",
93-
"react": "18.3.1",
94-
"react-dom": "18.3.1",
93+
"react": "19.0.0",
94+
"react-dom": "19.0.0",
9595
"react-dropzone": "14.3.5",
9696
"react-hook-form": "7.54.2",
9797
"react-plotly.js": "2.6.0",

pnpm-lock.yaml

Lines changed: 324 additions & 330 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/DataTable/IndeterminateCheckbox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ForwardedRef, forwardRef, type MutableRefObject, useEffect, useRef } from "react";
1+
import { type ForwardedRef, forwardRef, type RefObject, useEffect, useRef } from "react";
22

33
import { Checkbox, type CheckboxProps } from "@mui/material";
44

@@ -10,8 +10,8 @@ const IndeterminateCheckboxComponent = (
1010
{ indeterminate, ...rest }: CheckboxProps,
1111
ref: ForwardedRef<HTMLInputElement>,
1212
) => {
13-
const defaultRef = useRef();
14-
const resolvedRef = (ref ?? defaultRef) as MutableRefObject<HTMLButtonElement>;
13+
const defaultRef = useRef<HTMLButtonElement>(null);
14+
const resolvedRef = (ref ?? defaultRef) as RefObject<HTMLButtonElement>;
1515

1616
useEffect(() => {
1717
(resolvedRef.current as HTMLInputElement).indeterminate = !!(indeterminate ?? false);

src/components/runCards/JobCard/JobModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const JobModal = ({
126126
Object.keys(inputsData).length > 0 ? inputsData : specInputs,
127127
);
128128

129-
const formRef = useRef<any>();
129+
const formRef = useRef<any>(null);
130130

131131
// Since the default value are obtained async, we have to wait for them to arrive in order to set
132132
useEffect(() => {

src/components/userContext/SelectUnit.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ export const SelectUnit = ({
7272
}}
7373
/>
7474
)}
75-
renderOption={(props, option) => (
76-
<Box component="li" {...props}>
75+
renderOption={({ key, ...props }, option) => (
76+
<Box component="li" key={key} {...props}>
7777
<Box component="span" sx={{ display: "inline-block", pr: 1 }}>
7878
<ItemIcons item={option} />
7979
</Box>

src/features/DatasetUpload/SingleFileUploader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const SingleFileUploadWithProgress = ({
3838
changeMimeType,
3939
}: SingleFileUploadWithProgressProps) => {
4040
const queryClient = useQueryClient();
41-
const fileNameRef = useRef<HTMLInputElement>();
42-
const fileExtRef = useRef<HTMLInputElement>();
41+
const fileNameRef = useRef<HTMLInputElement>(null);
42+
const fileExtRef = useRef<HTMLInputElement>(null);
4343

4444
const composeNewFilePath = () => {
4545
return `${fileNameRef.current?.value}${fileExtRef.current?.value}`;

src/pages/_app.tsx

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useMemo } from "react";
1+
import { StrictMode, useMemo } from "react";
22

33
import { setBaseUrl as setASBaseUrl } from "@squonk/account-server-client";
44
import { setBaseUrl as setDMBaseUrl } from "@squonk/data-manager-client";
@@ -52,31 +52,33 @@ const App = ({ Component, pageProps }: CustomAppProps) => {
5252
// }
5353

5454
return (
55-
<AppCacheProvider {...pageProps}>
56-
<Head>
57-
<meta content="minimum-scale=1, initial-scale=1, width=device-width" name="viewport" />
58-
<style>{openSansFontCss}</style>
59-
</Head>
60-
<ThemeProviders>
61-
<UserProvider
62-
loginUrl={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/auth/login`}
63-
profileUrl={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/auth/me`}
64-
>
65-
<QueryClientProvider client={queryClient}>
66-
<HydrationBoundary state={pageProps.dehydratedState}>
67-
<SnackbarProvider>
68-
<MDXComponentProvider>
69-
<TopLevelHooks>
70-
<Component {...pageProps} />
71-
</TopLevelHooks>
72-
</MDXComponentProvider>
73-
</SnackbarProvider>
74-
</HydrationBoundary>
75-
<ReactQueryDevtools client={queryClient} />
76-
</QueryClientProvider>
77-
</UserProvider>
78-
</ThemeProviders>
79-
</AppCacheProvider>
55+
<StrictMode>
56+
<AppCacheProvider {...pageProps}>
57+
<Head>
58+
<meta content="minimum-scale=1, initial-scale=1, width=device-width" name="viewport" />
59+
<style>{openSansFontCss}</style>
60+
</Head>
61+
<ThemeProviders>
62+
<UserProvider
63+
loginUrl={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/auth/login`}
64+
profileUrl={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/auth/me`}
65+
>
66+
<QueryClientProvider client={queryClient}>
67+
<HydrationBoundary state={pageProps.dehydratedState}>
68+
<SnackbarProvider>
69+
<MDXComponentProvider>
70+
<TopLevelHooks>
71+
<Component {...pageProps} />
72+
</TopLevelHooks>
73+
</MDXComponentProvider>
74+
</SnackbarProvider>
75+
</HydrationBoundary>
76+
<ReactQueryDevtools client={queryClient} />
77+
</QueryClientProvider>
78+
</UserProvider>
79+
</ThemeProviders>
80+
</AppCacheProvider>
81+
</StrictMode>
8082
);
8183
};
8284

0 commit comments

Comments
 (0)