Skip to content

Commit

Permalink
no redirect after registering
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed Nov 14, 2024
1 parent 3dc14db commit 166edb8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions web/src/pages/[gameId]/end.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PaperCashIcon, Roll, Trophy, Warning } from "@/components/icons";
import { Layout } from "@/components/layout";

import {
Card,
Divider,
Expand All @@ -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";
Expand All @@ -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();
Expand All @@ -56,7 +51,6 @@ const EndContent = ({ game }: { game: GameClass }) => {
const [position, setPosition] = useState(0);
const [prev, setPrev] = useState<Game | undefined>(undefined);

const { account } = useAccount();
const { toast } = useToast();

const { isPending, registerScore } = useSystems();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 166edb8

Please sign in to comment.