File tree Expand file tree Collapse file tree 1 file changed +26
-19
lines changed
Expand file tree Collapse file tree 1 file changed +26
-19
lines changed Original file line number Diff line number Diff line change 11import { Box } from '@codecademy/gamut' ;
2+ import { useTheme } from '@emotion/react' ;
23import React from 'react' ;
34
45import { AppHeader } from '../AppHeader' ;
@@ -93,22 +94,28 @@ const getMobileAppHeaderItems = (
9394 }
9495} ;
9596
96- export const GlobalHeader : React . FC < GlobalHeaderProps > = ( props ) => (
97- < >
98- < Box display = { { base : 'none' , md : 'block' } } height = "80" >
99- < AppHeader action = { props . action } items = { getAppHeaderItems ( props ) } />
100- </ Box >
101- < Box
102- display = { { base : 'block' , md : 'none' } }
103- height = "64"
104- position = "relative"
105- zIndex = { 0 }
106- >
107- < AppHeaderMobile
108- action = { props . action }
109- items = { getMobileAppHeaderItems ( props ) }
110- renderSearch = { props . renderSearch ?. mobile }
111- />
112- </ Box >
113- </ >
114- ) ;
97+ export const GlobalHeader : React . FC < GlobalHeaderProps > = ( props ) => {
98+ const theme = useTheme ( ) ;
99+ return (
100+ < >
101+ < Box
102+ display = { { base : 'none' , md : 'block' } }
103+ height = { theme . elements . headerHeight }
104+ >
105+ < AppHeader action = { props . action } items = { getAppHeaderItems ( props ) } />
106+ </ Box >
107+ < Box
108+ display = { { base : 'block' , md : 'none' } }
109+ height = { theme . elements . headerHeight }
110+ position = "relative"
111+ zIndex = { 0 }
112+ >
113+ < AppHeaderMobile
114+ action = { props . action }
115+ items = { getMobileAppHeaderItems ( props ) }
116+ renderSearch = { props . renderSearch ?. mobile }
117+ />
118+ </ Box >
119+ </ >
120+ ) ;
121+ } ;
You can’t perform that action at this time.
0 commit comments