refresh button in clients page

This commit is contained in:
Pallavi Kumari
2025-10-04 12:20:46 +05:30
parent e7828a43fa
commit cfa82b51fb
2 changed files with 55 additions and 27 deletions

View File

@@ -8,13 +8,17 @@ import { DataTable } from "@app/components/ui/data-table";
interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[];
data: TData[];
onRefresh?: () => void;
isRefreshing?: boolean;
addClient?: () => void;
}
export function ClientsDataTable<TData, TValue>({
columns,
data,
addClient
addClient,
onRefresh,
isRefreshing
}: DataTableProps<TData, TValue>) {
return (
<DataTable
@@ -25,6 +29,8 @@ export function ClientsDataTable<TData, TValue>({
searchPlaceholder="Search clients..."
searchColumn="name"
onAdd={addClient}
onRefresh={onRefresh}
isRefreshing={isRefreshing}
addButtonText="Add Client"
/>
);