()
| 10 | * Use the current language to translate a string. |
| 11 | */ |
| 12 | export function useLanguage(): TranslationLanguage { |
| 13 | const language = React.useContext(TranslateContext); |
| 14 | if (!language) { |
| 15 | throw new Error('The hook useLanguage should be wrapped in a <TranslateContext>'); |
| 16 | } |
| 17 | return language; |
| 18 | } |
no outgoing calls
no test coverage detected