@mangoweb/contember-translation-provider
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -7,2 +7,3 @@ import * as React from 'react'; | ||
initialLanguage: string; | ||
onCurrentLanguageChange?: (language: string) => void; | ||
} | ||
@@ -9,0 +10,0 @@ export declare const ContemberTranslationProvider: React.FunctionComponent<ContemberTranslationProviderProps>; |
@@ -59,3 +59,8 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
}, [currentLanguage]); | ||
const setLanguage = (language) => setCurrentLanguage(language); | ||
const setLanguage = (language) => { | ||
if (props.onCurrentLanguageChange) { | ||
props.onCurrentLanguageChange(language); | ||
} | ||
setCurrentLanguage(language); | ||
}; | ||
const isLoadingInitialLanguage = isLoadingTranslations && | ||
@@ -62,0 +67,0 @@ typeof allTranslations[props.initialLanguage] === 'undefined'; |
{ | ||
"name": "@mangoweb/contember-translation-provider", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13866
110