File tree Expand file tree Collapse file tree 2 files changed +14
-32
lines changed
Expand file tree Collapse file tree 2 files changed +14
-32
lines changed 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' }
You can’t perform that action at this time.
0 commit comments