()
| 303 | }; |
| 304 | |
| 305 | export const useAuthInfo = (): AuthInfoContextValue => { |
| 306 | const authInfo = useContext(AuthInfoContext); |
| 307 | |
| 308 | if (!authInfo) { |
| 309 | throw new Error( |
| 310 | "Cannot use auth info because it has not been defined. Verify `useAuthInfo` is being called within a child of the `AuthInfoProvider`.", |
| 311 | ); |
| 312 | } |
| 313 | |
| 314 | return authInfo; |
| 315 | }; |
| 316 | |
| 317 | /** |
| 318 | * Use the currently authenticated user. |
no outgoing calls
no test coverage detected