import React, { useState, useEffect } from "react"; import { Link } from "react-router-dom"; import "./error.scss"; export function NotFoundPage({ history }) { const [t, setTimer] = useState(10); useEffect(() => { const timeout = window.setTimeout(() => { if (t == 0) { history.push("/"); return; } setTimer(t - 1); }, 1000); return () => { clearTimeout(timeout); }; }, [t]); return (

Oops!

We can't seem to find the page you're looking for.

You will be redirected to the homepage in {t} seconds

); }