File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ interface AnalysisGameListProps {
5151 setCurrentMove ?: Dispatch < SetStateAction < number > > ,
5252 ) => Promise < void >
5353 onCustomAnalysis ?: ( ) => void
54+ onGameSelected ?: ( ) => void // Called when a game is selected (for mobile popup closing)
5455 refreshTrigger ?: number // Used to trigger refresh when custom analysis is added
5556}
5657
@@ -61,6 +62,7 @@ export const AnalysisGameList: React.FC<AnalysisGameListProps> = ({
6162 loadNewUserGames,
6263 loadNewCustomGame,
6364 onCustomAnalysis,
65+ onGameSelected,
6466 refreshTrigger,
6567} ) => {
6668 const router = useRouter ( )
@@ -559,6 +561,8 @@ export const AnalysisGameList: React.FC<AnalysisGameListProps> = ({
559561 } else {
560562 router . push ( `/analysis/${ game . id } /${ game . type } ` )
561563 }
564+ // Call the callback if provided (for mobile popup closing)
565+ onGameSelected ?.( )
562566 } }
563567 className = "flex flex-1 cursor-pointer items-center justify-between overflow-hidden py-1"
564568 >
Original file line number Diff line number Diff line change @@ -905,6 +905,7 @@ const Analysis: React.FC<Props> = ({
905905 setShowCustomModal ( true )
906906 setShowGameListMobile ( false )
907907 } }
908+ onGameSelected = { ( ) => setShowGameListMobile ( false ) }
908909 refreshTrigger = { refreshTrigger }
909910 />
910911 </ div >
You can’t perform that action at this time.
0 commit comments