From 166edb8099c55ccfde058363209e8d2a89b63602 Mon Sep 17 00:00:00 2001 From: notV4l Date: Thu, 14 Nov 2024 12:25:45 +0100 Subject: [PATCH] no redirect after registering --- web/src/pages/[gameId]/end.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/web/src/pages/[gameId]/end.tsx b/web/src/pages/[gameId]/end.tsx index b53189ca..67798bd1 100644 --- a/web/src/pages/[gameId]/end.tsx +++ b/web/src/pages/[gameId]/end.tsx @@ -1,6 +1,5 @@ import { PaperCashIcon, Roll, Trophy, Warning } from "@/components/icons"; import { Layout } from "@/components/layout"; - import { Card, Divider, @@ -18,7 +17,6 @@ import { UnorderedList, VStack, } from "@chakra-ui/react"; - import { Button } from "@/components/common"; import { HustlerIcon, Hustlers } from "@/components/hustlers"; import ShareButton from "@/components/pages/profile/ShareButton"; @@ -30,15 +28,12 @@ import { useSystems, } from "@/dojo/hooks"; import { formatCash } from "@/utils/ui"; -import { useAccount } from "@starknet-react/core"; import { observer } from "mobx-react-lite"; import { ReactNode, useCallback, useEffect, useState } from "react"; import { num, shortString } from "starknet"; import { GameClass } from "@/dojo/class/Game"; import { Dopewars_Game as Game } from "@/generated/graphql"; import { useToast } from "@/hooks/toast"; -import { sleep } from "@/dojo/utils"; -import { GameMode } from "@/dojo/types"; const End = observer(() => { const { game } = useGameStore(); @@ -56,7 +51,6 @@ const EndContent = ({ game }: { game: GameClass }) => { const [position, setPosition] = useState(0); const [prev, setPrev] = useState(undefined); - const { account } = useAccount(); const { toast } = useToast(); const { isPending, registerScore } = useSystems(); @@ -115,9 +109,6 @@ const EndContent = ({ game }: { game: GameClass }) => { duration: 5_000, isError: false, }); - - await sleep(1000); - router.push(`/`); } } catch (e: any) { console.log(e);