blob: 3eabe6bb63938693ac5a53656a1cea7c2b9ca017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import { useNavigate } from "react-router-dom";
import notFoundImg from "../assets/404.png";
import { useEffect } from "react";
export default function NotFoundPage() {
const navigate = useNavigate();
useEffect(() => {
const timer = setTimeout(() => {
navigate('/', { replace: true });
}, 4000);
return () => clearTimeout(timer);
}, [navigate]);
return(
<>
<h1>404 - Not found</h1>
<img src={notFoundImg} className="rounded-lg"/>
</>
);
}
|