mirror of
https://github.com/docmost/docmost.git
synced 2026-09-01 03:15:32 +08:00
12 lines
362 B
TypeScript
12 lines
362 B
TypeScript
import { useQuery, UseQueryResult } from "@tanstack/react-query";
|
|
import { getEntitlements } from "./entitlement-service";
|
|
import { Entitlements } from "./entitlement.types";
|
|
|
|
export function useEntitlements(): UseQueryResult<Entitlements> {
|
|
return useQuery({
|
|
queryKey: ["entitlements"],
|
|
queryFn: getEntitlements,
|
|
staleTime: 5 * 60 * 1000,
|
|
});
|
|
}
|