()
| 16 | const ProviderContext = createContext<ProviderContextValue>({} as ProviderContextValue); |
| 17 | |
| 18 | export function useTriggerProvider() { |
| 19 | const value = useContext(ProviderContext); |
| 20 | if (!value) { |
| 21 | console.error( |
| 22 | "You must have a TriggerProvider above where you're using Trigger.dev hooks in your React tree." |
| 23 | ); |
| 24 | } |
| 25 | return value; |
| 26 | } |
| 27 | |
| 28 | type TriggerProviderProps = { |
| 29 | publicApiKey: string; |
no test coverage detected
searching dependent graphs…