Link to homepage should use internal Gatsby router
This commit is contained in:
parent
9fa7706b4d
commit
64ab4545d1
|
@ -26,6 +26,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
marginRight: theme.spacing(1),
|
marginRight: theme.spacing(1),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
link: {
|
||||||
|
width: "100%",
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function Header({ twhelpUrl, lang, languages, pathname }) {
|
function Header({ twhelpUrl, lang, languages, pathname }) {
|
||||||
|
@ -89,9 +92,10 @@ function Header({ twhelpUrl, lang, languages, pathname }) {
|
||||||
title="Home"
|
title="Home"
|
||||||
color="inherit"
|
color="inherit"
|
||||||
underline="none"
|
underline="none"
|
||||||
href={routes[lang].HOME}
|
className={classes.link}
|
||||||
|
to={routes[lang].HOME}
|
||||||
>
|
>
|
||||||
Home
|
Homepage
|
||||||
</Link>
|
</Link>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem>
|
<MenuItem>
|
||||||
|
|
|
@ -13,6 +13,9 @@ const useStyles = makeStyles(() => ({
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
},
|
},
|
||||||
|
layout: {
|
||||||
|
minHeight: "100vh",
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const NotFoundPage = ({ location, pageContext }) => {
|
const NotFoundPage = ({ location, pageContext }) => {
|
||||||
|
@ -22,6 +25,7 @@ const NotFoundPage = ({ location, pageContext }) => {
|
||||||
<Layout
|
<Layout
|
||||||
showHeader={false}
|
showHeader={false}
|
||||||
showFooter={false}
|
showFooter={false}
|
||||||
|
className={classes.layout}
|
||||||
lang={pageContext.langKey}
|
lang={pageContext.langKey}
|
||||||
pathname={location.pathname}
|
pathname={location.pathname}
|
||||||
>
|
>
|
||||||
|
|
Reference in New Issue
Block a user