Link to homepage should use internal Gatsby router

This commit is contained in:
Dawid Wysokiński 2020-06-30 15:49:13 +02:00
parent 9fa7706b4d
commit 64ab4545d1
2 changed files with 10 additions and 2 deletions

View File

@ -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>

View File

@ -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}
>