From ef24bc54f8ba991ce53a229ed0640505254ba045 Mon Sep 17 00:00:00 2001 From: starknetdev Date: Thu, 28 Sep 2023 15:16:48 +0100 Subject: [PATCH] remove fixed rank --- ui/src/app/components/adventurer/DeathDialog.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/src/app/components/adventurer/DeathDialog.tsx b/ui/src/app/components/adventurer/DeathDialog.tsx index cc3fe4092..ba39f1e91 100644 --- a/ui/src/app/components/adventurer/DeathDialog.tsx +++ b/ui/src/app/components/adventurer/DeathDialog.tsx @@ -16,8 +16,7 @@ import { getDeathMessageByRank } from "../../lib/utils"; import Image from "next/image"; export const DeathDialog = () => { - // const [rank, setRank] = useState(null); - const rank = 1; + const [rank, setRank] = useState(null); const deathMessage = useLoadingStore((state) => state.deathMessage); const setDeathMessage = useLoadingStore((state) => state.setDeathMessage); const adventurer = useAdventurerStore((state) => state.adventurer); @@ -48,7 +47,7 @@ export const DeathDialog = () => { adventurer?.id ?? 0, sortedAdventurersByXP?.adventurers ?? [] ); - // setRank(rank + 1); + setRank(rank + 1); }) .catch((error) => console.error("Error refetching data:", error)); }, []);