Skip to content

Commit

Permalink
Fix: ghost legion initial value
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Oct 15, 2023
1 parent 775bae6 commit 8d67714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/ghost-legion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8d67714

Please sign in to comment.