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),
|
||||
},
|
||||
},
|
||||
link: {
|
||||
width: "100%",
|
||||
},
|
||||
}));
|
||||
|
||||
function Header({ twhelpUrl, lang, languages, pathname }) {
|
||||
|
@ -89,9 +92,10 @@ function Header({ twhelpUrl, lang, languages, pathname }) {
|
|||
title="Home"
|
||||
color="inherit"
|
||||
underline="none"
|
||||
href={routes[lang].HOME}
|
||||
className={classes.link}
|
||||
to={routes[lang].HOME}
|
||||
>
|
||||
Home
|
||||
Homepage
|
||||
</Link>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
|
|
|
@ -13,6 +13,9 @@ const useStyles = makeStyles(() => ({
|
|||
justifyContent: "center",
|
||||
textAlign: "center",
|
||||
},
|
||||
layout: {
|
||||
minHeight: "100vh",
|
||||
},
|
||||
}));
|
||||
|
||||
const NotFoundPage = ({ location, pageContext }) => {
|
||||
|
@ -22,6 +25,7 @@ const NotFoundPage = ({ location, pageContext }) => {
|
|||
<Layout
|
||||
showHeader={false}
|
||||
showFooter={false}
|
||||
className={classes.layout}
|
||||
lang={pageContext.langKey}
|
||||
pathname={location.pathname}
|
||||
>
|
||||
|
|
Reference in New Issue
Block a user