File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ const PoweredByCalendso = () => (
1616 </ div >
1717) ;
1818
19- export default PoweredByCalendso ;
19+ export default PoweredByCalendso ;
Original file line number Diff line number Diff line change 11import { useTranslation } from "next-i18next" ;
2- import { useEffect } from "react" ;
32
43type LocaleProps = {
54 localeProp : string ;
@@ -8,9 +7,9 @@ type LocaleProps = {
87export const useLocale = ( props : LocaleProps ) => {
98 const { i18n, t } = useTranslation ( "common" ) ;
109
11- useEffect ( ( ) => {
12- ( async ( ) => await i18n . changeLanguage ( props . localeProp ) ) ( ) ;
13- } , [ i18n , props . localeProp ] ) ;
10+ if ( i18n . language !== props . localeProp ) {
11+ i18n . changeLanguage ( props . localeProp ) ;
12+ }
1413
1514 return {
1615 i18n,
You can’t perform that action at this time.
0 commit comments