From cbc17db44c18a19702938b3fe70ea3de81d326ea Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Mon, 1 Dec 2025 00:45:09 +0000 Subject: make it work --- source/96/src/app/not-found.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 source/96/src/app/not-found.js (limited to 'source/96/src/app/not-found.js') diff --git a/source/96/src/app/not-found.js b/source/96/src/app/not-found.js new file mode 100644 index 0000000..7298535 --- /dev/null +++ b/source/96/src/app/not-found.js @@ -0,0 +1,31 @@ +"use client"; + +import { useEffect, useState } from "react"; +import { useRouter } from "next/navigation"; + +export default () => { + const router = useRouter(); + + const [seconds, setSeconds] = useState(5); + + useEffect(() => { + const interval = setInterval(() => { + setSeconds((prev) => prev - 1); + }, 1000); + + if (seconds === 0) { + router.push("/"); + } + + return () => clearInterval(interval); + }, [seconds]); + + return ( +
+

404 - Page Not Found

+

+ Redirecting to Home in {seconds} seconds... +

+
+ ); +}; -- cgit v1.2.3