From 34f86264dceacde7b1dac19b82fad0bd1fe9e880 Mon Sep 17 00:00:00 2001 From: Alessandro Kreslin Date: Wed, 4 Mar 2026 08:35:47 -0500 Subject: [PATCH 1/3] initialize store on all pages (no persist gate) --- src/app/[locale]/[...slug]/page.tsx | 5 +---- src/app/store/store.ts | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/[locale]/[...slug]/page.tsx b/src/app/[locale]/[...slug]/page.tsx index d27f7582..31438948 100644 --- a/src/app/[locale]/[...slug]/page.tsx +++ b/src/app/[locale]/[...slug]/page.tsx @@ -5,15 +5,12 @@ import { type ReactNode, use, useEffect } from 'react'; import dynamic from 'next/dynamic'; import { PersistGate } from 'redux-persist/integration/react'; -import { persistStore } from 'redux-persist'; -import { store } from '../../store/store'; +import { persistor } from '../../store/store'; import { useAppDispatch } from '../../hooks'; import { resetProfileErrors } from '../../store/profile-reducer'; const App = dynamic(async () => await import('../../App'), { ssr: false }); -const persistor = persistStore(store); - interface PageProps { params: Promise<{ locale: string; diff --git a/src/app/store/store.ts b/src/app/store/store.ts index f00ff080..ffafe003 100644 --- a/src/app/store/store.ts +++ b/src/app/store/store.ts @@ -1,5 +1,6 @@ import { persistReducer, + persistStore, FLUSH, REHYDRATE, PAUSE, @@ -83,6 +84,11 @@ 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. +export const persistor = persistStore(store); + export type RootState = ReturnType; export type AppDispatch = typeof store.dispatch; export type AppThunk = ThunkAction< From 34dd94173b1853693ab5a3345f782580e1fac48d Mon Sep 17 00:00:00 2001 From: Alessandro Kreslin Date: Wed, 4 Mar 2026 09:10:20 -0500 Subject: [PATCH 2/3] lighthouse gbfs url fixed --- .github/lighthouserc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/lighthouserc.js b/.github/lighthouserc.js index 1f7dfafa..e4e7b1ae 100644 --- a/.github/lighthouserc.js +++ b/.github/lighthouserc.js @@ -9,7 +9,7 @@ module.exports = { `${previewBaseUrl}/feeds`, `${previewBaseUrl}/feeds/gtfs/mdb-2126`, `${previewBaseUrl}/feeds/gtfs_rt/mdb-2585`, - `${previewBaseUrl}/gbfs/gbfs-flamingo_porirua` + `${previewBaseUrl}/feeds/gbfs/gbfs-flamingo_porirua` ], numberOfRuns: 1, // 1 to speed up the CI process but can be increased for more reliable results settings: { From 1ab38d2d3894d002f2fdd9e8aac1e124ed722704 Mon Sep 17 00:00:00 2001 From: Alessandro Kreslin Date: Wed, 4 Mar 2026 09:10:37 -0500 Subject: [PATCH 3/3] image best practice fix --- src/app/components/Header.tsx | 2 +- src/app/components/HeaderMobileDrawer.tsx | 44 +++++++---------------- 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/src/app/components/Header.tsx b/src/app/components/Header.tsx index 50a67255..d240a2b6 100644 --- a/src/app/components/Header.tsx +++ b/src/app/components/Header.tsx @@ -218,7 +218,7 @@ export default function DrawerAppBar(): React.ReactElement { : '/assets/MOBILTYDATA_logo_purple_M.png' } alt='MobilityData logo' - width={45} + width={45 * 1.05} // aspect ratio of the logo is slightly off, adjust width to prevent layout shift between themes height={45} priority fetchPriority='high' diff --git a/src/app/components/HeaderMobileDrawer.tsx b/src/app/components/HeaderMobileDrawer.tsx index ece73a0a..eca4bb71 100644 --- a/src/app/components/HeaderMobileDrawer.tsx +++ b/src/app/components/HeaderMobileDrawer.tsx @@ -26,6 +26,7 @@ import { mobileNavElementStyle } from './Header.style'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import { useRemoteConfig } from '../context/RemoteConfigProvider'; import { useTranslations } from 'next-intl'; +import Image from 'next/image'; const websiteTile = 'MobilityDatabase'; @@ -55,37 +56,18 @@ export default function DrawerContent({ router.push('/'); }} > - {theme.palette.mode === 'light' ? ( - - - MobilityData logo - - ) : ( - - - MobilityData logo - - )} + MobilityData logo