MCPcopy
hub / github.com/OpenPipe/OpenPipe / useSelectedProject

Function useSelectedProject

app/src/utils/hooks.ts:139–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137export const useProjectList = api.projects.list.useQuery;
138
139export const useSelectedProject = () => {
140 const router = useRouter();
141
142 const projectSlug = router.query.projectSlug as string;
143
144 return api.projects.get.useQuery({ projectSlug: projectSlug ?? "" }, { enabled: !!projectSlug });
145};
146
147export const useDatasets = () => {
148 const selectedProjectId = useSelectedProject().data?.id;

Callers 15

useProjectLinkFunction · 0.90
useAccessCheckFunction · 0.90
ConditionallyEnableFunction · 0.90
OpenaiApiKeyDisplayFunction · 0.90
ProjectUserTableFunction · 0.90
UpdateOpenaiApiKeyModalFunction · 0.90
RemoveOpenaiApiKeyDialogFunction · 0.90
InviteProjectUserModalFunction · 0.90
DeleteProjectDialogFunction · 0.90
RemoveProjectUserDialogFunction · 0.90
NewMonitorButtonFunction · 0.90
MonitorsTableFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected