feat: updating settings general

This commit is contained in:
Chubby Granny Chaser 2024-06-03 02:21:22 +01:00
parent 3a16eb2913
commit eb3eb88f23
No known key found for this signature in database
2 changed files with 3 additions and 5 deletions

View File

@ -62,13 +62,12 @@ export function Downloads() {
const getFinalDownloadSize = (game: Game) => {
const isGameDownloading = lastPacket?.game.id === game.id;
if (!game) return "N/A";
if (game.fileSize) return formatBytes(game.fileSize);
if (lastPacket?.game.fileSize && isGameDownloading)
return formatBytes(lastPacket?.game.fileSize);
return game.repack?.fileSize ?? "N/A";
return "N/A";
};
const getGameInfo = (game: Game) => {

View File

@ -21,13 +21,12 @@ export function HeroPanel() {
const { progress, eta, lastPacket, isGameDeleting } = useDownload();
const finalDownloadSize = useMemo(() => {
if (!game) return "N/A";
if (game.fileSize) return formatBytes(game.fileSize);
if (game?.fileSize) return formatBytes(game.fileSize);
if (lastPacket?.game.fileSize && game?.status === "active")
return formatBytes(lastPacket?.game.fileSize);
return game.repack?.fileSize ?? "N/A";
return "N/A";
}, [game, lastPacket?.game]);
const isGameDownloading =