File tree Expand file tree Collapse file tree 5 files changed +22
-37
lines changed
Expand file tree Collapse file tree 5 files changed +22
-37
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ module.exports = {
99 `${ previewBaseUrl } /feeds` ,
1010 `${ previewBaseUrl } /feeds/gtfs/mdb-2126` ,
1111 `${ previewBaseUrl } /feeds/gtfs_rt/mdb-2585` ,
12- `${ previewBaseUrl } /gbfs/gbfs-flamingo_porirua`
12+ `${ previewBaseUrl } /feeds/ gbfs/gbfs-flamingo_porirua`
1313 ] ,
1414 numberOfRuns : 1 , // 1 to speed up the CI process but can be increased for more reliable results
1515 settings : {
Original file line number Diff line number Diff line change 55import { type ReactNode , use , useEffect } from 'react' ;
66import dynamic from 'next/dynamic' ;
77import { PersistGate } from 'redux-persist/integration/react' ;
8- import { persistStore } from 'redux-persist' ;
9- import { store } from '../../store/store' ;
8+ import { persistor } from '../../store/store' ;
109import { useAppDispatch } from '../../hooks' ;
1110import { resetProfileErrors } from '../../store/profile-reducer' ;
1211
1312const App = dynamic ( async ( ) => await import ( '../../App' ) , { ssr : false } ) ;
1413
15- const persistor = persistStore ( store ) ;
16-
1714interface PageProps {
1815 params : Promise < {
1916 locale : string ;
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ export default function DrawerAppBar(): React.ReactElement {
218218 : '/assets/MOBILTYDATA_logo_purple_M.png'
219219 }
220220 alt = 'MobilityData logo'
221- width = { 45 }
221+ width = { 45 * 1.05 } // aspect ratio of the logo is slightly off, adjust width to prevent layout shift between themes
222222 height = { 45 }
223223 priority
224224 fetchPriority = 'high'
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { mobileNavElementStyle } from './Header.style';
2626import ExpandMoreIcon from '@mui/icons-material/ExpandMore' ;
2727import { useRemoteConfig } from '../context/RemoteConfigProvider' ;
2828import { useTranslations } from 'next-intl' ;
29+ import Image from 'next/image' ;
2930
3031const websiteTile = 'MobilityDatabase' ;
3132
@@ -55,37 +56,18 @@ export default function DrawerContent({
5556 router . push ( '/' ) ;
5657 } }
5758 >
58- { theme . palette . mode === 'light' ? (
59- < picture style = { { display : 'flex' } } >
60- < source
61- src = '/assets/MOBILTYDATA_logo_light_blue_M.png'
62- type = 'image/png'
63- height = { 40 }
64- width = { 40 }
65- />
66- < img
67- alt = 'MobilityData logo'
68- src = '/assets/MOBILTYDATA_logo_light_blue_M.png'
69- height = { 40 }
70- width = { 40 }
71- />
72- </ picture >
73- ) : (
74- < picture style = { { display : 'flex' } } >
75- < source
76- src = '/assets/MOBILTYDATA_logo_purple_M.png'
77- type = 'image/png'
78- height = { 40 }
79- width = { 40 }
80- />
81- < img
82- alt = 'MobilityData logo'
83- src = '/assets/MOBILTYDATA_logo_purple_M.png'
84- height = { 40 }
85- width = { 40 }
86- />
87- </ picture >
88- ) }
59+ < Image
60+ src = {
61+ theme . palette . mode === 'light'
62+ ? '/assets/MOBILTYDATA_logo_light_blue_M.png'
63+ : '/assets/MOBILTYDATA_logo_purple_M.png'
64+ }
65+ alt = 'MobilityData logo'
66+ width = { 40 * 1.05 } // aspect ratio of the logo is slightly off, adjust width to prevent layout shift between themes
67+ height = { 40 }
68+ priority
69+ fetchPriority = 'high'
70+ />
8971
9072 < Typography
9173 component = { 'h2' }
Original file line number Diff line number Diff line change 11import {
22 persistReducer ,
3+ persistStore ,
34 FLUSH ,
45 REHYDRATE ,
56 PAUSE ,
@@ -83,6 +84,11 @@ if (typeof window !== 'undefined' && (window as any).Cypress) {
8384
8485sagaMiddleware . run ( rootSaga ) ;
8586
87+ // Create the persistor at the store level so rehydration and
88+ // state-persistence happen on every page load, not just on the
89+ // legacy catch-all route.
90+ export const persistor = persistStore ( store ) ;
91+
8692export type RootState = ReturnType < typeof store . getState > ;
8793export type AppDispatch = typeof store . dispatch ;
8894export type AppThunk < ReturnType = void > = ThunkAction <
You can’t perform that action at this time.
0 commit comments