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), 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>

View File

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