random 404 message

This commit is contained in:
Edward Shen 2020-11-27 14:08:18 -05:00
parent 333bbb9869
commit 2d7fdae813
Signed by: edward
GPG key ID: F350507060ED6C90

View file

@ -1,13 +1,17 @@
import { PageProps } from 'gatsby';
import React from 'react'; import React from 'react';
import Navbar from "../components/navbar"; import Navbar from "../components/navbar";
export default ({ location }) => { export default ({ location }: PageProps): JSX.Element => {
console.log(location); const messages = [
return <>
<Navbar />
<p> <p>
In your attempt to search for <code>{location.pathname}</code>, you seem to In your attempt to search for <code>{location.pathname}</code>, you seem to
have gotten lost instead. Fret not, for there is always a path <a href="/">home</a>. have gotten lost instead. Fret not, for there is always a path <a href="/">home</a>.
</p> </p>,
<p>Not all who wander are lost, but you seem to be. Go <a href="/">home</a>?</p>
];
return <>
<Navbar />
{messages[Math.floor(Math.random() * messages.length)]}
</>; </>;
}; };