From 4fb96319bfac4c0c000c302d63389a449146f436 Mon Sep 17 00:00:00 2001 From: tedison <76473430+edisontim@users.noreply.github.com> Date: Fri, 27 Dec 2024 13:19:34 -0500 Subject: [PATCH] remove leaderboard (#2616) --- .../modelManager/leaderboard/LeaderboardManager.ts | 4 +++- landing/src/routes/index.lazy.tsx | 11 +---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/landing/src/dojo/modelManager/leaderboard/LeaderboardManager.ts b/landing/src/dojo/modelManager/leaderboard/LeaderboardManager.ts index 0f05dcc97..5e32a84a2 100644 --- a/landing/src/dojo/modelManager/leaderboard/LeaderboardManager.ts +++ b/landing/src/dojo/modelManager/leaderboard/LeaderboardManager.ts @@ -142,7 +142,9 @@ export class LeaderboardManager { ); const epochEndTimestamp = - nextEpoch?.start_timestamp ?? season.is_over ? season.ended_at : BigInt(currentTimestamp); + season.is_over && nextEpoch === undefined + ? season.ended_at + : nextEpoch?.start_timestamp ?? BigInt(currentTimestamp); const epochDuration = epochEndTimestamp - epoch.start_timestamp; const nbOfCycles = Number(epochDuration) / ClientConfigManager.instance().getTick(TickIds.Default); diff --git a/landing/src/routes/index.lazy.tsx b/landing/src/routes/index.lazy.tsx index 082f99554..4eede8c04 100644 --- a/landing/src/routes/index.lazy.tsx +++ b/landing/src/routes/index.lazy.tsx @@ -1,6 +1,5 @@ import { AnimatedGrid } from "@/components/modules/animated-grid"; import { DataCard, DataCardProps } from "@/components/modules/data-card"; -import { Leaderboard } from "@/components/modules/leaderboard"; import { PRIZE_POOL_ACHIEVEMENTS, PRIZE_POOL_CONTENT_CREATORS, @@ -35,7 +34,6 @@ interface GridItemType { } function Index() { - const { data, isLoading } = useQuery({ queryKey: ["eternumStatistics"], queryFn: () => execute(GET_ETERNUM_STATTISTICS), @@ -129,14 +127,7 @@ function Index() { return (
, - }, - ]} + items={[...dataCards]} renderItem={(item) => React.isValidElement(item.data) ? item.data : }