diff --git a/ui/src/app/components/leaderboard/SeasonTable.tsx b/ui/src/app/components/leaderboard/SeasonTable.tsx index 457fdf2c8..f01906a89 100644 --- a/ui/src/app/components/leaderboard/SeasonTable.tsx +++ b/ui/src/app/components/leaderboard/SeasonTable.tsx @@ -28,12 +28,17 @@ const SeasonTable = ({ const network = useUIStore((state) => state.network); const seasonActive = process.env.NEXT_PUBLIC_SEASON_ACTIVE === "true"; + const isDSTournamentActive = + process.env.NEXT_PUBLIC_DS_TOURNAMENT_ACTIVE === "true"; + const dsTournamentId = process.env.NEXT_PUBLIC_DS_TOURNAMENT_ID ?? 0; // Memoize both the variables AND the client const { variables, client } = useMemo(() => { return { variables: { - tournamentId: networkConfig[network!].tournamentId, + tournamentId: isDSTournamentActive + ? dsTournamentId + : networkConfig[network!].tournamentId, }, client: tournamentClient(networkConfig[network!].tournamentGQLURL), }; @@ -99,9 +104,13 @@ const SeasonTable = ({

- {seasonActive ? "Current Season" : "Season Ended"} + {isDSTournamentActive + ? "Dark Shuffle Tournament" + : seasonActive + ? "Current Season" + : "Season Ended"}

- {seasonActive && ( + {(isDSTournamentActive || seasonActive) && ( <> diff --git a/ui/src/app/containers/AdventurerScreen.tsx b/ui/src/app/containers/AdventurerScreen.tsx index b47b58ee5..2d7377533 100644 --- a/ui/src/app/containers/AdventurerScreen.tsx +++ b/ui/src/app/containers/AdventurerScreen.tsx @@ -2,7 +2,6 @@ import { Button } from "@/app/components/buttons/Button"; import ButtonMenu from "@/app/components/menu/ButtonMenu"; import { AdventurersList } from "@/app/components/start/AdventurersList"; import { CreateAdventurer } from "@/app/components/start/CreateAdventurer"; -import DSTournamentOverview from "@/app/components/start/DSTournamentOverview"; import useAdventurerStore from "@/app/hooks/useAdventurerStore"; import useNetworkAccount from "@/app/hooks/useNetworkAccount"; import { useQueriesStore } from "@/app/hooks/useQueryStore"; @@ -75,9 +74,6 @@ export default function AdventurerScreen({ const { account } = useNetworkAccount(); const owner = account?.address ? padAddress(account.address) : ""; - const isDSTournamentActive = - process.env.NEXT_PUBLIC_DS_TOURNAMENT_ACTIVE === "true"; - const menu = [ { id: 1, @@ -101,43 +97,11 @@ export default function AdventurerScreen({ }, ]; - const dsTournamentMenu = [ - { - id: 1, - label: "Dark Shuffle Tournament", - value: "ds tournament", - action: () => { - setStartOption("ds tournament"); - }, - disabled: false, - }, - { - id: 2, - label: "Create Adventurer", - value: "create adventurer", - action: () => { - setStartOption("create adventurer"); - setAdventurer(NullAdventurer); - resetData("adventurerByIdQuery"); - }, - disabled: false, - }, - { - id: 3, - label: "Choose Adventurer", - value: "choose adventurer", - action: () => { - setStartOption("choose adventurer"); - }, - disabled: false, - }, - ]; - return (
setStartOption(value)} isActive={activeMenu == 0} setActiveMenu={setActiveMenu} @@ -145,12 +109,6 @@ export default function AdventurerScreen({ />
- {startOption === "ds tournament" && ( -
- -
- )} - {startOption === "create adventurer" && (
[ + { id: 1, label: "Start", screen: "start" as ScreenPage, disabled: false }, + { id: 2, label: "Play", screen: "play" as ScreenPage, disabled: false }, + { + id: 3, + label: "Inventory", + screen: "inventory" as ScreenPage, + disabled: false, + }, + { + id: 4, + label: "Upgrade", + screen: "upgrade" as ScreenPage, + disabled: false, + }, + { + id: 5, + label: "Leaderboard", + screen: "leaderboard" as ScreenPage, + disabled: false, + }, + { id: 6, label: "Guide", screen: "guide" as ScreenPage, disabled: false }, + { + id: 7, + label: "Tournament", + screen: "tournament" as ScreenPage, + disabled: false, + }, + ], + [onKatana] + ); + const mobileMenuItems: Menu[] = useMemo( () => [ { id: 1, label: "Start", screen: "start" as ScreenPage, disabled: false }, @@ -602,7 +639,7 @@ function Home() { if (!onboarded) { setScreen("onboarding"); } else if (onboarded) { - setScreen("start"); + setScreen("tournament"); } }, [onboarded]); @@ -816,7 +853,7 @@ function Home() {
{ setScreen(value); }} @@ -865,6 +902,9 @@ function Home() { {screen === "collections leaderboard" && ( )} + {screen === "tournament" && ( + + )} {screen === "settings" && } {screen === "player" && } {screen === "wallet" && }