File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,9 +169,7 @@ export function GameCard({ game }: { game: GamevaultGame }) {
169169 ) ;
170170
171171 const handleDirectDownload = useCallback (
172- async ( e : React . MouseEvent ) => {
173- e . preventDefault ( ) ;
174- e . stopPropagation ( ) ;
172+ async ( ) => {
175173 if ( ! serverUrl ) return ;
176174 await selectVersionAndRun ( "direct" ) ;
177175 } ,
@@ -206,9 +204,7 @@ export function GameCard({ game }: { game: GamevaultGame }) {
206204 ) ;
207205
208206 const handleClientDownload = useCallback (
209- async ( e : React . MouseEvent ) => {
210- e . preventDefault ( ) ;
211- e . stopPropagation ( ) ;
207+ async ( ) => {
212208 await selectVersionAndRun ( "client" ) ;
213209 } ,
214210 [ selectVersionAndRun ] ,
@@ -320,10 +316,22 @@ export function GameCard({ game }: { game: GamevaultGame }) {
320316 < CloudArrowDownIcon className = "w-6 h-6 fill-white" />
321317 </ DropdownButton >
322318 < DropdownMenu className = "min-w-48" anchor = "top end" >
323- < DropdownItem onClick = { handleDirectDownload } >
319+ < DropdownItem
320+ onClick = { ( e : React . MouseEvent ) => {
321+ e . preventDefault ( ) ;
322+ e . stopPropagation ( ) ;
323+ void handleDirectDownload ( ) ;
324+ } }
325+ >
324326 < DropdownLabel > Direct Download</ DropdownLabel >
325327 </ DropdownItem >
326- < DropdownItem onClick = { handleClientDownload } >
328+ < DropdownItem
329+ onClick = { ( e : React . MouseEvent ) => {
330+ e . preventDefault ( ) ;
331+ e . stopPropagation ( ) ;
332+ void handleClientDownload ( ) ;
333+ } }
334+ >
327335 < DropdownLabel > Download via GameVault Client</ DropdownLabel >
328336 </ DropdownItem >
329337 </ DropdownMenu >
You can’t perform that action at this time.
0 commit comments