Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"react-hook-form": "^7.52.1",
"react-map-gl": "^8.0.4",
"react-redux": "^8.1.3",
"react-router-dom": "^6.16.0",
Comment thread
davidgamez marked this conversation as resolved.
"react-window": "^2.1.2",
"recharts": "^2.12.7",
"redux-persist": "^6.0.0",
Expand Down Expand Up @@ -105,7 +104,6 @@
"@types/react-dom": "^19.2.3",
"@types/react-google-recaptcha": "^2.1.8",
"@types/react-redux": "^7.1.27",
"@types/react-router-dom": "^5.3.3",
"@types/react-window": "^2.0.0",
"@types/redux-saga": "^0.10.5",
"@typescript-eslint/eslint-plugin": "^6.7.0",
Expand Down
48 changes: 0 additions & 48 deletions src/app/App.css

This file was deleted.

53 changes: 0 additions & 53 deletions src/app/App.tsx

This file was deleted.

33 changes: 0 additions & 33 deletions src/app/AppContainer.tsx

This file was deleted.

37 changes: 0 additions & 37 deletions src/app/[locale]/[...slug]/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ interface Props {
* SECURITY: Direct access to /static/ routes is blocked at the proxy level
* (middleware returns 404). This route is only accessible via proxy rewrite
* from the clean URLs like /feeds/gtfs/mdb-123.
* 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.
*
* TODO: Now that legacy catch-all route is removed, change this to a private route `_static` and update proxy and links accordingly.
Comment thread
davidgamez marked this conversation as resolved.
*/
export default async function StaticFeedLayout({
children,
Expand Down
1 change: 0 additions & 1 deletion src/app/components/AuthBroadcastChannelSync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {

/**
* Registers the cross-tab auth broadcast channels once for the App Router tree.
* This replaces the legacy BrowserRouter-based registration in Router.tsx.
*/
export function AuthBroadcastChannelSync(): ReactElement | null {
const router = useRouter();
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/Context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { store } from '../store/store';
/**
* This component is used to wrap the entire application with Redux Provider
* It provides the Redux store to all components in the app
* IMPORTANT: This does not include the PersistGate, which is used in the page component to delay rendering until the store is rehydrated
* IMPORTANT: This does not include the PersistGate, which is applied by
* route-level wrappers where delayed rendering is required.
* This allows for a fast initial render, but makes it possible for components to access the store before it's fully rehydrated.
* 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.
* Use the `useRehydrated` hook to check rehydration status if needed.
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/ProtectedPageWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

// TODO: Once the [...slug] catch-all route is removed, replace this wrapper
// with a (protected) route group layout that provides auth guarding at the layout level.
// TODO: Replace this wrapper with a (protected) route group layout that
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an issue for following up on this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we do #116

// provides auth guarding at the layout level.
// targetStatus can be used to scope groups further (e.g. (authenticated), (unverified)).
import { useEffect } from 'react';
import { useSelector } from 'react-redux';
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/ReduxGateWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

// TODO: Once the [...slug] catch-all route is removed, replace this wrapper
// with a (store) route group layout that provides PersistGate at the layout level.
// TODO: Replace this wrapper with a (store) route group layout that provides
Comment thread
davidgamez marked this conversation as resolved.
// PersistGate at the layout level.
import { Suspense } from 'react';
import { PersistGate } from 'redux-persist/integration/react';
import { persistor } from '../store/store';
Expand Down
5 changes: 0 additions & 5 deletions src/app/router/Router.tsx

This file was deleted.

7 changes: 2 additions & 5 deletions src/app/screens/Feeds/SearchTable.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import SearchTable, { getDataTypeElement } from './SearchTable';
import { render, cleanup, screen, within } from '@testing-library/react';
import { MemoryRouter } from 'react-router-dom';
import { type AllFeedsType } from '../../services/feeds/utils';
import { ThemeProvider } from '@mui/material/styles';
import { theme } from '../../Theme';
Expand Down Expand Up @@ -140,15 +139,13 @@ const mockFeedsData: AllFeedsType = {
],
};

describe.only('getProviderElement', () => {
describe('getProviderElement', () => {
afterEach(cleanup);

it('should display the correct number of transit providers in table row', () => {
render(
<ThemeProvider theme={theme}>
<MemoryRouter>
<SearchTable feedsData={mockFeedsData} />
</MemoryRouter>
<SearchTable feedsData={mockFeedsData} />
</ThemeProvider>,
);

Expand Down
3 changes: 1 addition & 2 deletions src/app/store/saga/auth-saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ function* logoutSaga({
try {
broadcastMessage(LOGOUT_CHANNEL);
} catch {
// Broadcast channels may not be initialised if no
// legacy [...slug] page has been rendered yet.
// Broadcast channels may not be initialised yet.
}
}
navigateTo(redirectScreen);
Expand Down
3 changes: 1 addition & 2 deletions src/app/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ if (typeof window !== 'undefined' && (window as any).Cypress) {
sagaMiddleware.run(rootSaga);

// Create the persistor at the store level so rehydration and
// state-persistence happen on every page load, not just on the
// legacy catch-all route.
// state-persistence can be shared by route-level gate wrappers.
export const persistor = persistStore(store);

export type RootState = ReturnType<typeof store.getState>;
Expand Down
5 changes: 0 additions & 5 deletions src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ import {
DEFAULT_LOCALE,
} from './app/utils/proxy-helpers';

/**
* IMPORTANT: The logic of this proxy will be tested once the [...slug] route is removed
* Reasoning: [...slug] will catch all routes including those with wrong locale prefixes
*/

/**
* Internationalization and auth-routing proxy following the Next.js i18n guide.
* @see https://nextjs.org/docs/app/guides/internationalization
Expand Down
42 changes: 0 additions & 42 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3006,11 +3006,6 @@
redux-thunk "^2.4.2"
reselect "^4.1.8"

"@remix-run/router@1.23.2":
version "1.23.2"
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.23.2.tgz#156c4b481c0bee22a19f7924728a67120de06971"
integrity sha512-Ic6m2U/rMjTkhERIa/0ZtXJP17QUi2CbWE7cqx4J58M8aA3QTfW+2UlQ4psvTX9IO1RfNVhK3pcpdjej7L+t2w==

"@rollup/plugin-commonjs@28.0.1":
version "28.0.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz#e2138e31cc0637676dc3d5cae7739131f7cd565e"
Expand Down Expand Up @@ -3817,11 +3812,6 @@
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.16.tgz#8ebe53d69efada7044454e3305c19017d97ced2a"
integrity sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==

"@types/history@^4.7.11":
version "4.7.11"
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64"
integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==

"@types/hoist-non-react-statics@^3.3.0", "@types/hoist-non-react-statics@^3.3.1":
version "3.3.7"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.7.tgz#306e3a3a73828522efa1341159da4846e7573a6c"
Expand Down Expand Up @@ -4016,23 +4006,6 @@
hoist-non-react-statics "^3.3.0"
redux "^4.0.0"

"@types/react-router-dom@^5.3.3":
version "5.3.3"
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.3.3.tgz#e9d6b4a66fcdbd651a5f106c2656a30088cc1e83"
integrity sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==
dependencies:
"@types/history" "^4.7.11"
"@types/react" "*"
"@types/react-router" "*"

"@types/react-router@*":
version "5.1.20"
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.20.tgz#88eccaa122a82405ef3efbcaaa5dcdd9f021387c"
integrity sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==
dependencies:
"@types/history" "^4.7.11"
"@types/react" "*"

"@types/react-transition-group@^4.4.12":
version "4.4.12"
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.12.tgz#b5d76568485b02a307238270bfe96cb51ee2a044"
Expand Down Expand Up @@ -11447,21 +11420,6 @@ react-redux@^8.1.3:
react-is "^18.0.0"
use-sync-external-store "^1.0.0"

react-router-dom@^6.16.0:
version "6.30.3"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.30.3.tgz#42ae6dc4c7158bfb0b935f162b9621b29dddf740"
integrity sha512-pxPcv1AczD4vso7G4Z3TKcvlxK7g7TNt3/FNGMhfqyntocvYKj+GCatfigGDjbLozC4baguJ0ReCigoDJXb0ag==
dependencies:
"@remix-run/router" "1.23.2"
react-router "6.30.3"

react-router@6.30.3:
version "6.30.3"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.30.3.tgz#994b3ccdbe0e81fe84d4f998100f62584dfbf1cf"
integrity sha512-XRnlbKMTmktBkjCLE8/XcZFlnHvr2Ltdr1eJX4idL55/9BbORzyZEaIkBFDhFGCEWBBItsVrDxwx3gnisMitdw==
dependencies:
"@remix-run/router" "1.23.2"

react-smooth@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/react-smooth/-/react-smooth-4.0.4.tgz#a5875f8bb61963ca61b819cedc569dc2453894b4"
Expand Down
Loading