From df57e43059a230062d903f55f9af7339828875c3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Jul 2024 23:28:10 +0900 Subject: feat(frontend): partially implement gaming --- .../components/GolfPlayApps/GolfPlayAppGaming.tsx | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx (limited to 'frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx') diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx new file mode 100644 index 0000000..332cb3c --- /dev/null +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx @@ -0,0 +1,30 @@ +export default function GolfPlayAppGaming({ + problem, + onCodeChange, + currentScore, +}: { + problem: string; + onCodeChange: (code: string) => void; + currentScore: number | null; +}) { + const handleTextChange = (e: React.ChangeEvent) => { + onCodeChange(e.target.value); + }; + + return ( +
+
+
{problem}
+
+ {currentScore == null ? "Score: -" : `Score: ${currentScore}`} +
+
+
+