diff --git a/app/components/data-table.tsx b/app/components/data-table.tsx index 79f9b5b..f989308 100644 --- a/app/components/data-table.tsx +++ b/app/components/data-table.tsx @@ -18,16 +18,21 @@ import { Skeleton } from "./ui/skeleton"; import { DataTablePagination } from "./table-pagination" interface DataTableProps { - columns: ColumnDef[] + columns: ColumnDef[], + resource: string; + dataProviderName?: string; } export function DataTable({ columns, + resource, + dataProviderName }: DataTableProps) { const table = useTable({ columns, refineCoreProps: { - resource: "files" + resource, + dataProviderName: dataProviderName || "default" } }) diff --git a/app/components/pinnning-network-banner.tsx b/app/components/pinnning-network-banner.tsx index d521914..98c12a0 100644 --- a/app/components/pinnning-network-banner.tsx +++ b/app/components/pinnning-network-banner.tsx @@ -33,7 +33,7 @@ export const PinningNetworkBanner = () => { - {itemsLeft.length > 0 ? `${itemsLeft.length} left` : "Completed"} + {`${completedItems.length}/${cidList.length} items completed`} diff --git a/app/root.tsx b/app/root.tsx index 6f0e1fa..0d1d3cb 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -48,6 +48,7 @@ export default function App() { notificationProvider={notificationProvider} dataProvider={{ default: providers.default, + files: providers.files, pinning: providers.pinning }} resources={resources} diff --git a/app/routes/file-manager/columns.tsx b/app/routes/file-manager/columns.tsx index 67ec095..e56c63f 100644 --- a/app/routes/file-manager/columns.tsx +++ b/app/routes/file-manager/columns.tsx @@ -46,7 +46,7 @@ const CreatedOnCell = ({ row }: { row: Row }) => { onPin(row.getValue("cid")); }}> - Ping CID + Pin CID diff --git a/app/routes/file-manager/index.tsx b/app/routes/file-manager/index.tsx index 96a5777..e875b4f 100644 --- a/app/routes/file-manager/index.tsx +++ b/app/routes/file-manager/index.tsx @@ -55,6 +55,8 @@ export default function FileManager() { );