Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/(dashboard)/browser/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
CreationDate: string
Count?: number
Size?: string
SizeBytes?: number
}

type BucketUsageMap = Record<string, { objects_count?: number; size?: number } | undefined>
Expand All @@ -38,7 +39,7 @@
const router = useRouter()
const message = useMessage()
const dialog = useDialog()
const { isAdmin } = useAuth()

Check warning on line 42 in app/(dashboard)/browser/page.tsx

View workflow job for this annotation

GitHub Actions / 💅 Code Formatting

'isAdmin' is assigned a value but never used

Check warning on line 42 in app/(dashboard)/browser/page.tsx

View workflow job for this annotation

GitHub Actions / 💅 Code Formatting

'isAdmin' is assigned a value but never used

Check warning on line 42 in app/(dashboard)/browser/page.tsx

View workflow job for this annotation

GitHub Actions / 🔍 Code Quality

'isAdmin' is assigned a value but never used
const { listBuckets, deleteBucket } = useBucket()
const { getDataUsageInfo } = useSystem()

Expand Down Expand Up @@ -70,6 +71,7 @@
...row,
Count: objectsCount,
Size: niceBytes(String(totalSize)),
SizeBytes: totalSize,
}
}),
)
Expand Down Expand Up @@ -177,7 +179,9 @@
},
{
header: () => t("Size"),
accessorKey: "Size",
id: "SizeBytes",
// use numeric bytes for sorting via accessorFn, but display the formatted string
accessorFn: (row) => (typeof row.SizeBytes === "number" ? row.SizeBytes : undefined),
cell: ({ row }) =>
row.original.Size ?? (usageLoading ? <Spinner className="size-3 text-muted-foreground" /> : "--"),
},
Expand Down