(SdkContext: React.Context<Sdk | undefined>)
| 40 | } |
| 41 | |
| 42 | function useSdk<Sdk extends FirebaseSdks>(SdkContext: React.Context<Sdk | undefined>): Sdk { |
| 43 | const sdk = React.useContext(SdkContext); |
| 44 | |
| 45 | if (!sdk) { |
| 46 | throw new Error('SDK not found. useSdk must be called from within a provider'); |
| 47 | } |
| 48 | |
| 49 | return sdk; |
| 50 | } |
| 51 | |
| 52 | function useInitSdk<Sdk extends FirebaseSdks>( |
| 53 | sdkName: string, |
no outgoing calls
no test coverage detected