(matches?: UIMatch[])
| 11 | "routes/_app.orgs.$organizationSlug.projects.$projectParam.jobs.$jobParam"; |
| 12 | |
| 13 | export function useOptionalJob(matches?: UIMatch[]) { |
| 14 | const routeMatch = useTypedMatchesData<typeof loader>({ |
| 15 | id: jobMatchId, |
| 16 | matches, |
| 17 | }); |
| 18 | |
| 19 | if (!routeMatch) { |
| 20 | return undefined; |
| 21 | } |
| 22 | |
| 23 | return routeMatch.job; |
| 24 | } |
| 25 | |
| 26 | export function useJob(matches?: UIMatch[]) { |
| 27 | const job = useOptionalJob(matches); |
no test coverage detected
searching dependent graphs…