diff --git a/src/popups/GamesDownload.tsx b/src/popups/GamesDownload.tsx
index ea92fe9..eafdb3d 100644
--- a/src/popups/GamesDownload.tsx
+++ b/src/popups/GamesDownload.tsx
@@ -6,20 +6,28 @@ import {
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
export default function GamesDownloadPopup () {
- const { serverVersionList, setSelectedGame } = useGlobal()
+ const {
+ serverVersionList,
+ setSelectedGame,
+ setManagingGame,
+ setPopupMode,
+ setShowPopup,
+ setFadeOut,
+ setViewingInfoFromDownloads
+ } = useGlobal()
return (
<>
Select a game to download
{serverVersionList?.games
- .filter(i => {
+ .filter(g => {
const gameVersions = serverVersionList.versions.filter(
- vf => vf.game === i.id
+ gv => gv.game === g.id
)
if (gameVersions.length > 0) return true
})
- .map((v, i) => (
+ .map((g, i) => (
-
{v.name}
+
{g.name}
Size on disk:{' '}
- {gameSize && gameSize > 0
- ? prettyBytes(gameSize, {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2
- })
- : 'N/A'}
+ {prettyBytes(gameSize, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2
+ })}
Uninstall
diff --git a/src/popups/ManageVersion.tsx b/src/popups/ManageVersion.tsx
index 3b8f559..bc57260 100644
--- a/src/popups/ManageVersion.tsx
+++ b/src/popups/ManageVersion.tsx
@@ -101,12 +101,10 @@ export default function ManageVersionPopup () {
Size on disk:{' '}
- {versionSize && versionSize > 0
- ? prettyBytes(versionSize, {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2
- })
- : 'N/A'}
+ {prettyBytes(versionSize, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2
+ })}
Select versions to download
- {list.map((v, i) => (
-
-