* feat: server side sorting for insights routing ^ Conflicts: ^ packages/prisma/playground.ts * fix download csv * fix hooks locations
12 lines
289 B
TypeScript
12 lines
289 B
TypeScript
import { useContext } from "react";
|
|
|
|
import { DataTableContext } from "../lib/context";
|
|
|
|
export function useDataTable() {
|
|
const context = useContext(DataTableContext);
|
|
if (!context) {
|
|
throw new Error("useDataTable must be used within a DataTableProvider");
|
|
}
|
|
return context;
|
|
}
|