Skip to content

Commit 9b7e489

Browse files
Merge pull request #131 from MobilityData/feat/26-legacy-router-migration-4
feat: legacy router migration 4
2 parents 849b0ee + 5f22b7c commit 9b7e489

16 files changed

Lines changed: 11 additions & 242 deletions

File tree

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"react-hook-form": "^7.52.1",
4242
"react-map-gl": "^8.0.4",
4343
"react-redux": "^8.1.3",
44-
"react-router-dom": "^6.16.0",
4544
"react-window": "^2.1.2",
4645
"recharts": "^2.12.7",
4746
"redux-persist": "^6.0.0",
@@ -104,7 +103,6 @@
104103
"@types/react-dom": "^19.2.3",
105104
"@types/react-google-recaptcha": "^2.1.8",
106105
"@types/react-redux": "^7.1.27",
107-
"@types/react-router-dom": "^5.3.3",
108106
"@types/react-window": "^2.0.0",
109107
"@types/redux-saga": "^0.10.5",
110108
"@typescript-eslint/eslint-plugin": "^6.7.0",

src/app/App.css

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/app/App.tsx

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/app/AppContainer.tsx

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/app/[locale]/[...slug]/page.tsx

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/app/[locale]/feeds/[feedDataType]/[feedId]/static/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ interface Props {
2222
* SECURITY: Direct access to /static/ routes is blocked at the proxy level
2323
* (middleware returns 404). This route is only accessible via proxy rewrite
2424
* from the clean URLs like /feeds/gtfs/mdb-123.
25-
* NOTE: In the future we will use private route `_static` but due to our legacy handler `[...slug]` catching all routes, we need to use a public route and block access at the proxy for now.
26-
*
25+
* TODO: Now that legacy catch-all route is removed, change this to a private route `_static` and update proxy and links accordingly.
2726
*/
2827
export default async function StaticFeedLayout({
2928
children,

src/app/components/AuthBroadcastChannelSync.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313

1414
/**
1515
* Registers the cross-tab auth broadcast channels once for the App Router tree.
16-
* This replaces the legacy BrowserRouter-based registration in Router.tsx.
1716
*/
1817
export function AuthBroadcastChannelSync(): ReactElement | null {
1918
const router = useRouter();

src/app/components/Context.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { store } from '../store/store';
88
/**
99
* This component is used to wrap the entire application with Redux Provider
1010
* It provides the Redux store to all components in the app
11-
* IMPORTANT: This does not include the PersistGate, which is used in the page component to delay rendering until the store is rehydrated
11+
* IMPORTANT: This does not include the PersistGate, which is applied by
12+
* route-level wrappers where delayed rendering is required.
1213
* This allows for a fast initial render, but makes it possible for components to access the store before it's fully rehydrated.
1314
* This also allows for us to have SSG pages that use Redux. It also allows for these pages to be rendered purely in HTML on the server side without waiting for Redux Persist to rehydrate the store.
1415
* Use the `useRehydrated` hook to check rehydration status if needed.

src/app/components/ProtectedPageWrapper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

3-
// TODO: Once the [...slug] catch-all route is removed, replace this wrapper
4-
// with a (protected) route group layout that provides auth guarding at the layout level.
3+
// TODO: Replace this wrapper with a (protected) route group layout that
4+
// provides auth guarding at the layout level.
55
// targetStatus can be used to scope groups further (e.g. (authenticated), (unverified)).
66
import { useEffect } from 'react';
77
import { useSelector } from 'react-redux';

src/app/components/ReduxGateWrapper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

3-
// TODO: Once the [...slug] catch-all route is removed, replace this wrapper
4-
// with a (store) route group layout that provides PersistGate at the layout level.
3+
// TODO: Replace this wrapper with a (store) route group layout that provides
4+
// PersistGate at the layout level.
55
import { Suspense } from 'react';
66
import { PersistGate } from 'redux-persist/integration/react';
77
import { persistor } from '../store/store';

0 commit comments

Comments
 (0)