From 83d3e8b72b74fe6fb9bacc480f3d0b9b9b8cb35f Mon Sep 17 00:00:00 2001 From: RedBeardEth <90423049+RedBeardEth@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:16:44 +1100 Subject: [PATCH 1/2] Revert "client timer" This reverts commit 7e97fdac916a9c61faf7aa13502f4de4a2a87df2. --- client/src/hooks/useSeasonStart.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/useSeasonStart.tsx b/client/src/hooks/useSeasonStart.tsx index 6ea2e3eda..f20c8f2a6 100644 --- a/client/src/hooks/useSeasonStart.tsx +++ b/client/src/hooks/useSeasonStart.tsx @@ -1,8 +1,8 @@ -//import { configManager } from "@/dojo/setup"; +import { configManager } from "@/dojo/setup"; import { useMemo, useState } from "react"; export const useSeasonStart = () => { - const seasonStart = BigInt(new Date("2024-12-11T15:35:00Z").getTime() / 1000);/*useMemo(() => BigInt(configManager.getSeasonConfig().startAt || 0), []);*/ + const seasonStart = useMemo(() => BigInt(configManager.getSeasonConfig().startAt || 0), []); const nextBlockTimestamp = useMemo(() => BigInt(Math.floor(Date.now() / 1000)), []); const [countdown, setCountdown] = useState(0n); From 4add62bf84e68567729f54c07895044e0b86c990 Mon Sep 17 00:00:00 2001 From: RedBeardEth <90423049+RedBeardEth@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:17:13 +1100 Subject: [PATCH 2/2] Revert "quick fix for timer" This reverts commit a6198995e7899265b4fa1c6dd013085ec0a04797. --- landing/src/components/modules/season-start-timer.tsx | 2 +- landing/src/components/ui/elements/CountdownTimer.tsx | 1 - landing/src/hooks/use-season-start.tsx | 5 ++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/landing/src/components/modules/season-start-timer.tsx b/landing/src/components/modules/season-start-timer.tsx index 24846921f..942eb25e3 100644 --- a/landing/src/components/modules/season-start-timer.tsx +++ b/landing/src/components/modules/season-start-timer.tsx @@ -10,7 +10,7 @@ export const SeasonStartTimer = () => { return (
- {"<"} {String(hours).padStart(2, "0")}:{String(minutes).padStart(2, "0")}:{String(seconds).padStart(2, "0")} + {String(hours).padStart(2, "0")}:{String(minutes).padStart(2, "0")}:{String(seconds).padStart(2, "0")}
); }; diff --git a/landing/src/components/ui/elements/CountdownTimer.tsx b/landing/src/components/ui/elements/CountdownTimer.tsx index c05e176cd..f1ae81bae 100644 --- a/landing/src/components/ui/elements/CountdownTimer.tsx +++ b/landing/src/components/ui/elements/CountdownTimer.tsx @@ -22,7 +22,6 @@ export function CountdownTimer() { Eternum is Launching in
- {"<"} diff --git a/landing/src/hooks/use-season-start.tsx b/landing/src/hooks/use-season-start.tsx index cfe4a36b7..b49fbc8b7 100644 --- a/landing/src/hooks/use-season-start.tsx +++ b/landing/src/hooks/use-season-start.tsx @@ -1,9 +1,8 @@ +import { configManager } from "@/dojo/setup"; import { useEffect, useState } from "react"; export const useSeasonStart = () => { - const seasonStart = BigInt(new Date("2024-12-11T15:35:00Z").getTime() / 1000); - - /*BigInt(configManager.getSeasonConfig().startAt || 0);*/ + const seasonStart = BigInt(configManager.getSeasonConfig().startAt || 0); const nextBlockTimestamp = BigInt(Math.floor(Date.now() / 1000)); const [countdown, setCountdown] = useState(0n);