()
| 9 | export const AlertContext = createContext<AlertContextProps | undefined>(undefined) |
| 10 | |
| 11 | export function useAlertContext(): AlertContextProps { |
| 12 | const context = useContext(AlertContext) |
| 13 | |
| 14 | if (!context) { |
| 15 | throw new Error('useAlertContext should be used within the AlertContext provider!') |
| 16 | } |
| 17 | |
| 18 | return context |
| 19 | } |
no outgoing calls
no test coverage detected