diff --git a/src/components/dashboard/DashForgeTracker.tsx b/src/components/dashboard/DashForgeTracker.tsx index 41b021a1..46a70526 100644 --- a/src/components/dashboard/DashForgeTracker.tsx +++ b/src/components/dashboard/DashForgeTracker.tsx @@ -1,60 +1,85 @@ -import { useState, useEffect } from 'preact/hooks'; - -export default function DashForgeTracker() { - const [now, setNow] = useState(new Date()); - const [startTime] = useState(new Date()); - - useEffect(() => { - const t = setInterval(() => setNow(new Date()), 1000); - return () => clearInterval(t); - }, []); - - const elapsed = Math.floor((now.getTime() - startTime.getTime()) / 1000); - const pad = (n: number) => String(n).padStart(2, '0'); - const hh = pad(Math.floor(elapsed / 3600)); - const mm = pad(Math.floor((elapsed % 3600) / 60)); - const ss = pad(elapsed % 60); - - return ( -
- {/* Decorative circles (like in Donezo) */} -