File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,17 @@ interface HeaderProps extends ThemeEditorProps {
3939 toggleNavigation : ( ) => void
4040}
4141
42+ const isDev = process . env . NODE_ENV === 'development'
43+
4244export const HeaderContentLayout : FC < HeaderProps > = ( {
4345 className,
4446 toggleNavigation,
4547 updateTheme,
4648 hasCustomTheme,
4749} ) => {
48- const location = useLocation ( )
49- const currentPath = location . pathname
50+ const { pathname } = useLocation ( )
51+ const showHamburger =
52+ pathname . substring ( 1 ) . split ( '/' ) . length < ( isDev ? 2 : 4 )
5053
5154 const data = useStaticQuery ( graphql `
5255 query HeaderNav {
@@ -73,7 +76,7 @@ export const HeaderContentLayout: FC<HeaderProps> = ({
7376 height = "100%"
7477 >
7578 < Space >
76- { currentPath === '/' ? (
79+ { showHamburger ? (
7780 < span />
7881 ) : (
7982 < IconButton
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ const Intro = () => {
9797 Install
9898 </ Heading >
9999 < Paragraph fontSize = "small" >
100- Visit the < Link href = "/ develop/ "> Develop</ Link > page for
100+ Visit the < Link to = " develop"> Develop</ Link > page for
101101 instructions on installing{ ' ' }
102102 < Code fontSize = "small" > @looker/components</ Code >
103103 </ Paragraph >
You can’t perform that action at this time.
0 commit comments