From c6ab1db6688f26880503e59b165cba4849f924be Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 22 Aug 2024 12:09:04 +0900 Subject: feat(frontend): jotai for watch app --- .../app/components/GolfWatchApps/GolfWatchAppStarting.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'frontend/app/components/GolfWatchApps/GolfWatchAppStarting.tsx') 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 (
{gameDisplayName}
-
+
{leftTimeSeconds}
-- cgit v1.2.3-70-g09d2