mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
chore: resolve yarn.lock conflict
This commit is contained in:
commit
671c160e49
8 changed files with 32 additions and 49 deletions
|
@ -1,5 +1,4 @@
|
|||
import { format } from "date-fns";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
|
@ -12,6 +11,7 @@ import { NoEntryIcon, PlusCircleIcon } from "@primer/octicons-react";
|
|||
import { BinaryNotFoundModal } from "../shared-modals/binary-not-found-modal";
|
||||
import * as styles from "./hero-panel.css";
|
||||
import { useDate } from "@renderer/hooks/use-date";
|
||||
import { formatBytes } from "@renderer/utils";
|
||||
|
||||
export interface HeroPanelProps {
|
||||
game: Game | null;
|
||||
|
@ -122,10 +122,10 @@ export function HeroPanel({
|
|||
|
||||
const finalDownloadSize = useMemo(() => {
|
||||
if (!game) return "N/A";
|
||||
if (game.fileSize) return prettyBytes(game.fileSize);
|
||||
if (game.fileSize) return formatBytes(game.fileSize);
|
||||
|
||||
if (gameDownloading?.fileSize && isGameDownloading)
|
||||
return prettyBytes(gameDownloading.fileSize);
|
||||
return formatBytes(gameDownloading.fileSize);
|
||||
|
||||
return game.repack?.fileSize ?? "N/A";
|
||||
}, [game, isGameDownloading, gameDownloading]);
|
||||
|
@ -172,7 +172,7 @@ export function HeroPanel({
|
|||
</>
|
||||
) : (
|
||||
<p className={styles.downloadDetailsRow}>
|
||||
{prettyBytes(gameDownloading?.bytesDownloaded)} /{" "}
|
||||
{formatBytes(gameDownloading?.bytesDownloaded)} /{" "}
|
||||
{finalDownloadSize}
|
||||
<small>
|
||||
{numPeers} peers / {numSeeds} seeds
|
||||
|
@ -192,7 +192,7 @@ export function HeroPanel({
|
|||
})}
|
||||
</p>
|
||||
<p>
|
||||
{prettyBytes(game.bytesDownloaded)} / {finalDownloadSize}
|
||||
{formatBytes(game.bytesDownloaded)} / {finalDownloadSize}
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue