mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-06-30 12:33:31 +00:00
fixed typecheck error uwu
This commit is contained in:
parent
0b671b2935
commit
f4d42d437e
|
@ -44,7 +44,7 @@ const StatCard = ({ icon, name, devices, connectionType, ...stats }: StatCardPro
|
|||
usedSpace.unit = humanizeSize(Number(stats.totalSpace) - Number(stats.freeSpace)).unit;
|
||||
|
||||
const progress = useMemo(() => {
|
||||
if (!mounted || totalSpace.original === 0) return 0;
|
||||
if (!mounted || totalSpace.bytes === 0n) return 0;
|
||||
return Math.floor((usedSpace.value / totalSpace.value) * 100);
|
||||
}, [mounted, totalSpace, usedSpace]);
|
||||
const { t } = useLocale();
|
||||
|
|
Loading…
Reference in a new issue