From ca73316ee96d1c9256d712f7923c801749629221 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sat, 8 Jun 2024 11:33:59 -0300 Subject: [PATCH] code adjustment --- .../game-details/modals/game-options-modal.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/renderer/src/pages/game-details/modals/game-options-modal.tsx b/src/renderer/src/pages/game-details/modals/game-options-modal.tsx index 569a9509..26ac041f 100644 --- a/src/renderer/src/pages/game-details/modals/game-options-modal.tsx +++ b/src/renderer/src/pages/game-details/modals/game-options-modal.tsx @@ -35,12 +35,12 @@ export function GameOptionsModal({ cancelDownload, } = useDownload(); - const deleting = game ? isGameDeleting(game?.id) : false; + const deleting = isGameDeleting(game.id); const { lastPacket } = useDownload(); const isGameDownloading = - game?.status === "active" && lastPacket?.game.id === game?.id; + game.status === "active" && lastPacket?.game.id === game.id; const handleRemoveGameFromLibrary = async () => { if (isGameDownloading) { @@ -129,15 +129,10 @@ export function GameOptionsModal({ type="button" theme="outline" onClick={handleOpenGameExecutablePath} - disabled={!game.executablePath} > {t("open_folder")} - @@ -161,7 +156,7 @@ export function GameOptionsModal({