From 30d0f3842591d3d1d18169863d640749df04e2e1 Mon Sep 17 00:00:00 2001
From: xXJSONDeruloXx <danielhimebauch@gmail.com>
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() {
     <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>
-- 
cgit v1.2.3

