Notification toasts, nicer loading, add new user support

This commit is contained in:
Jamie Curnow committed 2025-10-02 08:11:14 +10:00
1 parent fadec9751e
commit 61a92906f3
31 files changed
+401 -215

No files matched your search

+8 -2
View File
@@ -12,8 +12,9 @@ interface Props {
isFetching?: boolean;
currentUserId?: number;
onEditUser?: (id: number) => void;
onNewUser?: () => void;
}
export default function Table({ data, isFetching, currentUserId, onEditUser }: Props) {
export default function Table({ data, isFetching, currentUserId, onEditUser, onNewUser }: Props) {
const columnHelper = createColumnHelper<User>();
const columns = useMemo(
() => [
@@ -124,5 +125,10 @@ export default function Table({ data, isFetching, currentUserId, onEditUser }: P
enableSortingRemoval: false,
});
return <TableLayout tableInstance={tableInstance} emptyState={<Empty tableInstance={tableInstance} />} />;
return (
<TableLayout
tableInstance={tableInstance}
emptyState={<Empty tableInstance={tableInstance} onNewUser={onNewUser} />}
/>
);
}