feat: add My Uploads listing with card and table views

This commit is contained in:
2026-06-18 21:22:44 +05:30
parent dff9e2222f
commit a18fff4d6f
28 changed files with 1060 additions and 127 deletions

View File

@@ -73,6 +73,7 @@ export interface DataTableProps<TData, TValue> {
sorting?: SortingState;
onSortingChange?: (sorting: SortingState) => void;
enableColumnControls?: boolean;
onRowClick?: (row: TData) => void;
/** Minimum width (px) for every column unless overridden in the column def. */
minColumnSize?: number;
}
@@ -111,6 +112,7 @@ function DataTableContent<TData, TValue>({
emptyTitle = 'No results found.',
emptyDescription = 'Try adjusting your filters or search terms.',
pagination,
onRowClick,
sorting: controlledSorting,
onSortingChange,
enableColumnControls = true,
@@ -281,6 +283,8 @@ function DataTableContent<TData, TValue>({
<TableRow
key={row.id}
data-state={row.getIsSelected() && 'selected'}
onClick={() => onRowClick?.(row.original)}
className={cn(onRowClick && 'cursor-pointer')}
>
{row.getVisibleCells().map((cell) => {
const truncate = shouldTruncateCell(cell.column);