MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / useInvoices

Function useInvoices

app/src/utils/hooks.ts:439–446  ·  view source on GitHub ↗
(refetchInterval?: number)

Source from the content-addressed store, hash-verified

437};
438
439export const useInvoices = (refetchInterval?: number) => {
440 const selectedProjectId = useSelectedProject().data?.id;
441
442 return api.invoices.list.useQuery(
443 { projectId: selectedProjectId ?? "" },
444 { enabled: !!selectedProjectId, refetchInterval },
445 );
446};
447
448export const useInvoice = (id: string, refetchInterval?: number) => {
449 const selectedProjectId = useSelectedProject().data?.id;

Callers 1

InvoicesFunction · 0.90

Calls 1

useSelectedProjectFunction · 0.85

Tested by

no test coverage detected