From 8d6771480c09da3ef31b0b80e459c35eba60be5b Mon Sep 17 00:00:00 2001 From: Akalanka Date: Sun, 15 Oct 2023 22:06:58 +0530 Subject: [PATCH] Fix: ghost legion initial value --- src/hooks/ghost-legion.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/ghost-legion.jsx b/src/hooks/ghost-legion.jsx index 99dc3d5..50cd27e 100644 --- a/src/hooks/ghost-legion.jsx +++ b/src/hooks/ghost-legion.jsx @@ -3,7 +3,7 @@ import { useSearchParams } from "react-router-dom"; const useGhostLegion = () => { const [searchParams, setSearchParams] = useSearchParams(); - const [ghostLegion, setGhostLegion] = useState(Boolean(searchParams.get("ghost_legion"))); + const [ghostLegion, setGhostLegion] = useState(searchParams.get("ghost_legion") === "true"); const toggleGhostLegion = () => { setGhostLegion(!ghostLegion); searchParams.set("ghost_legion", !ghostLegion);