aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-15 23:23:16 +0900
committernsfisis <nsfisis@gmail.com>2025-03-15 23:23:16 +0900
commit17c1fbe0f8565f191a191138bebac7409512962e (patch)
tree848eb22810ce3298ef40d7a196bfd461e41e802f /frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
parent172b6d3211d040e8d577afda80debce583c3bf7c (diff)
downloadiosdc-japan-2025-albatross-17c1fbe0f8565f191a191138bebac7409512962e.tar.gz
iosdc-japan-2025-albatross-17c1fbe0f8565f191a191138bebac7409512962e.tar.zst
iosdc-japan-2025-albatross-17c1fbe0f8565f191a191138bebac7409512962e.zip
feat(frontend): improve left time display
Diffstat (limited to 'frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx')
-rw-r--r--frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
index 5c5e149..743588d 100644
--- a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
+++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
@@ -8,6 +8,7 @@ import {
statusAtom,
} from "../../states/play";
import type { PlayerProfile } from "../../types/PlayerProfile";
+import LeftTime from "../Gaming/LeftTime";
import Problem from "../Gaming/Problem";
import SubmitResult from "../Gaming/SubmitResult";
import UserIcon from "../UserIcon";
@@ -49,18 +50,12 @@ export default function GolfPlayAppGaming({
}
};
- const leftTime = (() => {
- const m = Math.floor(leftTimeSeconds / 60);
- const s = leftTimeSeconds % 60;
- return `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
- })();
-
return (
<div className="min-h-screen bg-gray-100 flex flex-col">
<div className="text-white bg-sky-600 flex flex-row justify-between px-4 py-2">
<div className="font-bold">
<div className="text-gray-100">{gameDisplayName}</div>
- <div className="text-2xl">{leftTime}</div>
+ <LeftTime sec={leftTimeSeconds} />
</div>
<Link to={"/dashboard"}>
<div className="flex gap-4 my-auto font-bold">