diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-01-26 20:18:53 -0500 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-01-26 20:18:53 -0500 |
| commit | 30d0f3842591d3d1d18169863d640749df04e2e1 (patch) | |
| tree | 374c9865151eef0741ed22d2edd4b48b91c8d0c1 | |
| parent | 401827ebec7a833b45c16c4d23f314f272532e50 (diff) | |
| download | Decky-Framegen-30d0f3842591d3d1d18169863d640749df04e2e1.tar.gz Decky-Framegen-30d0f3842591d3d1d18169863d640749df04e2e1.zip | |
add print statement on click
| -rwxr-xr-x | src/index.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
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() { <PanelSection title="Installed Games"> {games.map((game) => ( <PanelSectionRow key={game.appid}> - <ButtonItem layout="below"> + <ButtonItem + layout="below" + onClick={() => setClickedGame(game)} + > {game.name} (AppID: {game.appid}) </ButtonItem> + {clickedGame?.appid === game.appid && ( + <div style={{ padding: '8px' }}> + You clicked {game.name} with AppID: {game.appid} + </div> + )} </PanelSectionRow> ))} </PanelSection> |
