diff --git a/app/(dashboard)/browser/page.tsx b/app/(dashboard)/browser/page.tsx index 5518334..9cf8055 100644 --- a/app/(dashboard)/browser/page.tsx +++ b/app/(dashboard)/browser/page.tsx @@ -29,6 +29,7 @@ interface BucketRow { CreationDate: string Count?: number Size?: string + SizeBytes?: number } type BucketUsageMap = Record @@ -70,6 +71,7 @@ function BrowserBucketsPage() { ...row, Count: objectsCount, Size: niceBytes(String(totalSize)), + SizeBytes: totalSize, } }), ) @@ -177,7 +179,9 @@ function BrowserBucketsPage() { }, { 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 ? : "--"), },