diff --git a/client/src/pages/End/End.jsx b/client/src/pages/End/End.jsx
index 6cf165b..1f62504 100644
--- a/client/src/pages/End/End.jsx
+++ b/client/src/pages/End/End.jsx
@@ -1,11 +1,13 @@
import "./styles.sass";
-import {useContext, useEffect} from "react";
+import {useContext, useEffect, useState} from "react";
import {socket} from "@/common/utils/socket.js";
import {GroupContext} from "@/common/contexts/GroupContext.jsx";
import Sound from "react-sound";
import ThemeSound from "@/common/sounds/end.mp3";
import {MusicContext} from "@/common/contexts/MusicContext.jsx";
import {Navigate} from "react-router";
+import Button from "@/common/components/Button";
+import {faArrowLeft, faArrowRight} from "@fortawesome/free-solid-svg-icons";
const localeOptions = {
style: "decimal",
@@ -16,47 +18,107 @@ const localeOptions = {
export const End = () => {
- const {groups, allGroups} = useContext(GroupContext);
+ const {groups, allGroups, roundHistory} = useContext(GroupContext);
const {musicEnabled} = useContext(MusicContext);
+ const [roundShown, setRoundShown] = useState(roundHistory.length + 1);
+
useEffect(() => {
socket.disconnect();
socket.connect();
}, []);
+ const nextRound = () => {
+ if (roundShown === roundHistory.length + 1) return;
+ setRoundShown(round => round + 1);
+ }
+
+ const prevRound = () => {
+ if (roundShown === 1) return;
+ setRoundShown(round => round - 1);
+ }
+
if (groups.length === 0 && allGroups.length === 0)
return
Unternehmen
-Startkapital
-Gewinn/Verlust
- {group.capital - 25000 > 0 && -Firmenwert
-Unternehmen
+Absatzpreis
+Menge
+Verkauft
+Kapital + {r.profit > 0 && + {r.profit?.toLocaleString("de-DE", localeOptions)} €} + {r.profit < 0 && - {r.profit?.toLocaleString("de-DE", localeOptions)} €} + {r.profit === 0 && (Unverändert)} +
+Unternehmen
+Startkapital
+Gewinn/Verlust
+ {group.capital - 25000 > 0 && +Firmenwert
+