From 46b3f5952b396bf47d15d3852037eca08cef7773 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Mon, 20 Nov 2023 21:17:32 +0100 Subject: [PATCH] Fixed a bug in the End.jsx page --- client/src/pages/End/End.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/pages/End/End.jsx b/client/src/pages/End/End.jsx index 7f63e76..6cf165b 100644 --- a/client/src/pages/End/End.jsx +++ b/client/src/pages/End/End.jsx @@ -5,6 +5,7 @@ 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"; const localeOptions = { style: "decimal", @@ -23,10 +24,13 @@ export const End = () => { socket.connect(); }, []); + if (groups.length === 0 && allGroups.length === 0) + return ; + return (
- {[...groups, ...allGroups].map(group => ( + {[...groups, ...allGroups].sort((a, b) => b.capital - a.capital).map(group => (

Unternehmen