Skip to content

Commit

Permalink
Migrate react-router to v7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
asiia-trilitech committed Jan 8, 2025
1 parent 70ebc41 commit c36d64a
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 51 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"react-refresh": "^0.16.0",
"react-remove-scroll": "^2.6.2",
"react-responsive-carousel": "^3.2.23",
"react-router-dom": "^6.28.1",
"react-router-dom": "^7.0.0",
"react-test-renderer": "^18.3.1",
"redux": "^5.0.1",
"redux-persist": "^6.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const RenameRemoveMenuSwitch = ({ account }: { account: Account }) => {
onSubmit={() => {
removeAccount(account);
closeModal();
navigate("/");
void navigate("/");
}}
title={title}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/components/SendFlow/SuccessStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const SuccessStep = ({ hash }: { hash: string }) => {
width="100%"
onClick={() => {
onClose();
navigate("/operations");
void navigate("/operations");
}}
size="lg"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/views/home/AccountListWithDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const AccountListWithDrawer = () => {
const closeDrawer = useCallback(() => {
setSelectedAccount(null);
onClose();
navigate("/home");
void navigate("/home");
}, [onClose, navigate]);

// For some reason the drawer doesn't close on esc for this particular component
Expand Down
2 changes: 1 addition & 1 deletion apps/embed-iframe-mainnet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@umami/embed-iframe": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.28.1"
"react-router-dom": "^7.0.0"
},
"devDependencies": {
"@umami/eslint-config": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion apps/embed-iframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"framer-motion": "^11.15.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.28.1"
"react-router-dom": "^7.0.0"
},
"devDependencies": {
"@umami/eslint-config": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"react-redux": "^9.2.0",
"react-remove-scroll": "^2.6.2",
"react-responsive-carousel": "^3.2.23",
"react-router": "^6.28.1",
"react-router-dom": "^6.28.1",
"react-router": "^7.0.0",
"react-router-dom": "^7.0.0",
"react-test-renderer": "^18.3.1",
"redux": "^5.0.1",
"redux-persist": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/SendFlow/SuccessStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const SuccessStep = ({ hash }: { hash: string }) => {
width="100%"
onClick={() => {
onClose();
navigate("/activity");
void navigate("/activity");
}}
size="lg"
variant="primary"
Expand Down
7 changes: 1 addition & 6 deletions apps/web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
<PersistGate loading={<div>loading</div>} persistor={persistor}>
<ErrorBoundary fallback={<ErrorPage />} onError={logError}>
<ReactQueryProvider>
<BrowserRouter
future={{
v7_relativeSplatPath: true,
v7_startTransition: true,
}}
>
<BrowserRouter>
<DynamicDisclosureProvider>
<App />
</DynamicDisclosureProvider>
Expand Down
7 changes: 1 addition & 6 deletions apps/web/src/testUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,7 @@ const makeWrapper =
});

return (
<BrowserRouter
future={{
v7_relativeSplatPath: true,
v7_startTransition: true,
}}
>
<BrowserRouter>
<QueryClientProvider client={new QueryClient()}>
<Provider store={store}>
<DynamicModalContext.Provider value={dynamicModal}>
Expand Down
83 changes: 53 additions & 30 deletions pnpm-lock.yaml

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

0 comments on commit c36d64a

Please sign in to comment.