From 7bbb1389ff86df0c4f7dd1c1705f4192bb2f18ee Mon Sep 17 00:00:00 2001 From: Carlos Lostao Date: Sun, 17 Nov 2024 18:20:13 +0100 Subject: [PATCH] update: cast all to int --- frontend/src/components/Files/Metadata.tsx | 2 +- frontend/src/components/RemainingCreditTracker/index.tsx | 9 +++++++-- frontend/src/components/common/FileCard.tsx | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Files/Metadata.tsx b/frontend/src/components/Files/Metadata.tsx index e737da8c..2ab602ca 100644 --- a/frontend/src/components/Files/Metadata.tsx +++ b/frontend/src/components/Files/Metadata.tsx @@ -18,7 +18,7 @@ export const Metadata = ({ object }: { object: ObjectSummary }) => { )} -

Size: {bytes(object.size)}

+

Size: {bytes(Number(object.size))}

CID: {object.headCid}

diff --git a/frontend/src/components/RemainingCreditTracker/index.tsx b/frontend/src/components/RemainingCreditTracker/index.tsx index de7826ce..899ad082 100644 --- a/frontend/src/components/RemainingCreditTracker/index.tsx +++ b/frontend/src/components/RemainingCreditTracker/index.tsx @@ -31,8 +31,13 @@ export const RemainingCreditTracker = ({
- {bytes(uploadUsed)}/ - {bytes(uploadLimit)} + + {bytes(Number(uploadUsed))} + + / + + {bytes(Number(uploadLimit))} + diff --git a/frontend/src/components/common/FileCard.tsx b/frontend/src/components/common/FileCard.tsx index a14fecbc..85d5949d 100644 --- a/frontend/src/components/common/FileCard.tsx +++ b/frontend/src/components/common/FileCard.tsx @@ -90,7 +90,7 @@ export const FileCard = ({

{name}

-

Size: {bytes(totalSize)}

+

Size: {bytes(Number(totalSize))}