()
| 196 | export const MainContext = createContext<MainContextT | null>(null) |
| 197 | |
| 198 | export const useMainContext = (): MainContextT => { |
| 199 | const context = useContext(MainContext) |
| 200 | |
| 201 | if (!context) { |
| 202 | throw new Error('"useMainContext" may only be used inside "MainContext.Provider"') |
| 203 | } |
| 204 | |
| 205 | return context |
| 206 | } |
no outgoing calls
no test coverage detected