From cd0fa27acef7830cc72bcc7240d6d97f3cb35650 Mon Sep 17 00:00:00 2001 From: Gonzalo Alonso Fernandez Date: Sat, 20 Apr 2024 10:57:38 +0200 Subject: [PATCH] fix: fixed an error checking if the game is active. --- webapp/src/pages/Dashboard.jsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/webapp/src/pages/Dashboard.jsx b/webapp/src/pages/Dashboard.jsx index aa7daaf4..3bb86210 100644 --- a/webapp/src/pages/Dashboard.jsx +++ b/webapp/src/pages/Dashboard.jsx @@ -60,8 +60,8 @@ export default function Dashboard() { useEffect(() => { async function checkActiveStatus() { - const active = await isActive(); - setActive(active); + const i = await isActive(); + setActive(i.data.is_active); } checkActiveStatus(); }, []); @@ -126,7 +126,7 @@ export default function Dashboard() { - {active && ( + {!active && ( {modes.map(mode => ( - )} - {!active && ( + ) : (