diff --git a/frontend/index.html b/frontend/index.html
index 072a57e..9b6bc52 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -4,7 +4,7 @@
-
frontend
+ Lose verkaufen
diff --git a/frontend/src/pages/SuccessPage.tsx b/frontend/src/pages/SuccessPage.tsx
index ae54f10..4995e7d 100644
--- a/frontend/src/pages/SuccessPage.tsx
+++ b/frontend/src/pages/SuccessPage.tsx
@@ -1,4 +1,4 @@
-import { Box, Paper, Typography, Chip } from "@mui/material";
+import { Box, Paper, Typography, Chip, Button } from "@mui/material";
import { useEffect, useState } from "react";
import { CircleCheck } from "lucide-react";
import { useTranslation } from "react-i18next";
@@ -8,6 +8,7 @@ export const SuccessPage = () => {
const [tickets, setNumberOfTickets] = useState(0);
const [animate, setAnimate] = useState(false);
const { t } = useTranslation();
+ const [seconds, setSeconds] = useState(30);
useEffect(() => {
const params = new URLSearchParams(window.location.search);
@@ -20,6 +21,17 @@ export const SuccessPage = () => {
setTimeout(() => setAnimate(true), 100);
}, []);
+ useEffect(() => {
+ if (seconds === 0) {
+ window.location.href = "/";
+ return;
+ }
+
+ const timer = setTimeout(() => setSeconds(seconds - 1), 1000);
+
+ return () => clearTimeout(timer);
+ }, [seconds]);
+
return (
{
)}
+ {/* Return button */}
+
+
+
+
{/* Additional Info */}