export const PostsTable = ({ userId }: PostsTableProps) => {
const { data: posts, isPending } = trpc.posts.getAll.useQuery({
userId,
});
const { table } = useDataTable({
data: posts ?? [],
});
return (
<DataTable table={table} isLoading={isPending}>
{ /* ... */ }
</DataTable>
);
};
export const PostsTable = ({ userId }: PostsTableProps) => {
const { data: posts, isPending } = trpc.posts.getAll.useQuery({
userId,
});
const { table } = useDataTable({
data: posts ?? [],
});
return (
<DataTable table={table} isLoading={isPending}>
{ /* ... */ }
</DataTable>
);
};