Wait Seite läft in localhoost

This commit is contained in:
ISA
2024-10-17 12:14:56 +02:00
parent 49d9142863
commit c5cf6964a2
6 changed files with 327 additions and 250 deletions

26
app/wait/page.jsx Normal file
View File

@@ -0,0 +1,26 @@
"use client"; // app/wait/page.jsx
import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { ClipLoader } from "react-spinners";
export default function WaitPage() {
const router = useRouter();
useEffect(() => {
// Starte den Timer, um nach 20 Sekunden weiterzuleiten
const timer = setTimeout(() => {
router.push("/");
}, 20000); // 20 Sekunden warten
// Timer aufräumen, wenn die Komponente entladen wird
return () => clearTimeout(timer);
}, [router]);
return (
<div style={{ textAlign: "center", marginTop: "100px" }}>
<h1>Bitte warten...</h1>
<ClipLoader color={"#76c7c0"} size={50} /> {/* Spinner */}
<p>Die Seite wird automatisch neu geladen.</p>
</div>
);
}