From 30d0f3842591d3d1d18169863d640749df04e2e1 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Sun, 26 Jan 2025 20:18:53 -0500 Subject: add print statement on click --- src/index.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/index.tsx') diff --git a/src/index.tsx b/src/index.tsx index 227cce7..98611a2 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -232,6 +232,7 @@ function MainRunningApp() { function InstalledGamesSection() { const [games, setGames] = useState<{ appid: string; name: string }[]>([]); + const [clickedGame, setClickedGame] = useState<{ appid: string; name: string } | null>(null); useEffect(() => { const fetchGames = async () => { @@ -253,9 +254,17 @@ function InstalledGamesSection() { {games.map((game) => ( - + setClickedGame(game)} + > {game.name} (AppID: {game.appid}) + {clickedGame?.appid === game.appid && ( +
+ You clicked {game.name} with AppID: {game.appid} +
+ )}
))}
-- cgit v1.2.3