MCPcopy Create free account
hub / github.com/triggerdotdev/trigger.dev / useOptionalProject

Function useOptionalProject

apps/webapp/app/hooks/useProject.tsx:11–18  ·  view source on GitHub ↗
(matches?: UIMatch[])

Source from the content-addressed store, hash-verified

9export type MatchedProject = UseDataFunctionReturn<typeof orgLoader>["project"];
10
11export function useOptionalProject(matches?: UIMatch[]) {
12 const routeMatch = useTypedMatchesData<typeof orgLoader>({
13 id: organizationMatchId,
14 matches,
15 });
16
17 return routeMatch?.project;
18}
19
20export function useProject(matches?: UIMatch[]) {
21 const project = useOptionalProject(matches);

Callers 4

NavBarFunction · 0.90
useEnvironmentsFunction · 0.90
useOptionalRunFunction · 0.90
useProjectFunction · 0.85

Calls 1

useTypedMatchesDataFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…