Skip to content

Commit

Permalink
update: cast all to int
Browse files Browse the repository at this point in the history
  • Loading branch information
clostao committed Nov 17, 2024
1 parent 448a995 commit 7bbb138
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Files/Metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Metadata = ({ object }: { object: ObjectSummary }) => {
</span>
)}
</div>
<p className='text-gray-500'>Size: {bytes(object.size)}</p>
<p className='text-gray-500'>Size: {bytes(Number(object.size))}</p>
<p>
CID: <span className='text-blue-500'>{object.headCid}</span>
</p>
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/components/RemainingCreditTracker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ export const RemainingCreditTracker = ({
<div>
<div className='mb-1 flex justify-between text-sm text-gray-600'>
<span>
<span className='text-primary'>{bytes(uploadUsed)}</span>/
<span className='text-gray-500'>{bytes(uploadLimit)}</span>
<span className='text-primary'>
{bytes(Number(uploadUsed))}
</span>
/
<span className='text-gray-500'>
{bytes(Number(uploadLimit))}
</span>
</span>
<span className='text-secondary px-2'>
<Upload className='h-4 w-4' />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/FileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const FileCard = ({
</PopoverButton>
</div>
<h2 className='mb-2 text-lg font-semibold text-gray-800'>{name}</h2>
<p className='mb-4 text-gray-500'>Size: {bytes(totalSize)}</p>
<p className='mb-4 text-gray-500'>Size: {bytes(Number(totalSize))}</p>
<button
onClick={handleDownloadClick}
className='flex w-full items-center justify-center rounded-lg bg-blue-500 px-4 py-2 font-semibold text-white hover:bg-blue-600'
Expand Down

0 comments on commit 7bbb138

Please sign in to comment.