File tree Expand file tree Collapse file tree 4 files changed +3
-13
lines changed Expand file tree Collapse file tree 4 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 5
5
"dependencies" : {
6
6
"react" : " ^16.1.1" ,
7
7
"react-dom" : " ^16.1.1" ,
8
- "react-multi-lang" : " ^1.0.0" ,
9
8
"react-scripts" : " 1.0.17"
10
9
},
11
10
"scripts" : {
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ class App extends React.Component {
8
8
setLanguage ( lang )
9
9
}
10
10
render ( ) {
11
- console . log ( getLanguage ( ) )
12
11
return (
13
12
< div className = "App" >
14
13
< header className = "App-header" >
@@ -20,6 +19,8 @@ class App extends React.Component {
20
19
< p className = "App-intro" >
21
20
To change language just press the buttons beneath
22
21
</ p >
22
+ < div > Selected lang < b > { getLanguage ( ) } </ b > </ div >
23
+ < br />
23
24
< button onClick = { ( ) => this . changeLang ( 'pt' ) } > PT</ button >
24
25
< button onClick = { ( ) => this . changeLang ( 'en' ) } > EN</ button >
25
26
</ div >
Original file line number Diff line number Diff line change @@ -2935,10 +2935,6 @@ hoek@4.x.x:
2935
2935
version "4.2.0"
2936
2936
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"
2937
2937
2938
- hoist-non-react-statics@^2.3.1 :
2939
- version "2.5.0"
2940
- resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40"
2941
-
2942
2938
home-or-tmp@^2.0.0 :
2943
2939
version "2.0.0"
2944
2940
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
@@ -5131,12 +5127,6 @@ react-error-overlay@^3.0.0:
5131
5127
version "3.0.0"
5132
5128
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-3.0.0.tgz#c2bc8f4d91f1375b3dad6d75265d51cd5eeaf655"
5133
5129
5134
- react-multi-lang@^1.0.0 :
5135
- version "1.0.0"
5136
- resolved "https://registry.yarnpkg.com/react-multi-lang/-/react-multi-lang-1.0.0.tgz#0e328d5b3a357f5c6203dd8f0323cceda216ccfd"
5137
- dependencies :
5138
- hoist-non-react-statics "^2.3.1"
5139
-
5140
5130
react-scripts@1.0.17 :
5141
5131
version "1.0.17"
5142
5132
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-1.0.17.tgz#c30029123b561a060227af4d7797d50a222d3fbf"
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export function translate (Component: React$ComponentType<*>): React$ComponentTy
122
122
123
123
render ( ) {
124
124
return (
125
- < Component { ...this . props } t = { ( key : string , args ? : { [ string ] : string } ) : string => t ( key , args ) } />
125
+ < Component { ...this . props } t = { t } />
126
126
)
127
127
}
128
128
}
You can’t perform that action at this time.
0 commit comments