mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 12:13:27 +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;
|
usedSpace.unit = humanizeSize(Number(stats.totalSpace) - Number(stats.freeSpace)).unit;
|
||||||
|
|
||||||
const progress = useMemo(() => {
|
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);
|
return Math.floor((usedSpace.value / totalSpace.value) * 100);
|
||||||
}, [mounted, totalSpace, usedSpace]);
|
}, [mounted, totalSpace, usedSpace]);
|
||||||
const { t } = useLocale();
|
const { t } = useLocale();
|
||||||
|
|
Loading…
Reference in a new issue