diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-22 12:09:04 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-22 13:15:59 +0900 |
| commit | c6ab1db6688f26880503e59b165cba4849f924be (patch) | |
| tree | 24e52810b9a06527ac4a500b51e2df8e52cee055 /frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx | |
| parent | a2b6ed9cd67f1406a6656bce9b3d51b55378ac1e (diff) | |
| download | phperkaigi-2025-albatross-c6ab1db6688f26880503e59b165cba4849f924be.tar.gz phperkaigi-2025-albatross-c6ab1db6688f26880503e59b165cba4849f924be.tar.zst phperkaigi-2025-albatross-c6ab1db6688f26880503e59b165cba4849f924be.zip | |
feat(frontend): jotai for watch app
Diffstat (limited to 'frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx')
| -rw-r--r-- | frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx index cd4195d..684d2af 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx @@ -1,18 +1,19 @@ +import { useAtomValue } from "jotai"; +import { startingLeftTimeSecondsAtom } from "../../states/watch"; + type Props = { gameDisplayName: string; - leftTimeSeconds: number; }; -export default function GolfWatchAppStarting({ - gameDisplayName, - leftTimeSeconds, -}: Props) { +export default function GolfWatchAppStarting({ gameDisplayName }: Props) { + const leftTimeSeconds = useAtomValue(startingLeftTimeSecondsAtom)!; + return ( <div className="min-h-screen bg-gray-100 flex flex-col"> <div className="text-white bg-iosdc-japan p-10 text-center"> <div className="text-4xl font-bold">{gameDisplayName}</div> </div> - <div className="text-center text-black font-black text-10xl animate-ping"> + <div className="text-center text-black font-black text-10xl"> {leftTimeSeconds} </div> </div> |
