diff --git a/pages/404.tsx b/pages/404.tsx new file mode 100644 index 0000000..1968d85 --- /dev/null +++ b/pages/404.tsx @@ -0,0 +1,11 @@ +import type { NextPage } from 'next'; +import { useRouter } from 'next/navigation'; +import { useEffect } from 'react'; + +// This custom 404 page will just redirect to / +// This is fine for this site because there are only two pages +const NotFound: NextPage = (): JSX.Element => { + const { push } = useRouter(); + useEffect(() => push('/')); +}; +export default NotFound;