Skip to content

Commit

Permalink
fix(api): adjust to api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
devshred committed Jun 28, 2024
1 parent a718db2 commit baeddb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/@types/upload.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
export interface UploadedFile {
id: string
filename: string
mimeType: string
href: string
size: number
name: string
}
7 changes: 1 addition & 6 deletions src/routes/(root)/-components/MergeFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ const MergeFiles = () => {
removeUploadedFile(file)
}

const addThousandsSeparator = (x: number, separator: string) =>
x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, separator)

return (
<>
<DragDropContext onDragEnd={onDragEnd}>
Expand All @@ -49,9 +46,7 @@ const MergeFiles = () => {
<FaEllipsisVertical className="relative top-1" />
</div>
<div className="flex-grow overflow-hidden text-ellipsis whitespace-nowrap">
{file.filename} -{' '}
{addThousandsSeparator(Math.round(file.size / 1024), '.')}
kB
{file.name}
</div>
<div className="flex-shrink justify-end">
<FaTrashCan
Expand Down

0 comments on commit baeddb6

Please sign in to comment.