Showing
1 changed file
with
2 additions
and
3 deletions
... | @@ -13,7 +13,7 @@ class App extends React.Component { | ... | @@ -13,7 +13,7 @@ class App extends React.Component { |
13 | isAuthenticated: false, | 13 | isAuthenticated: false, |
14 | } | 14 | } |
15 | } | 15 | } |
16 | - | 16 | + |
17 | componentDidMount(props){ | 17 | componentDidMount(props){ |
18 | var urlQuery = url.parse(window.location.href).query; | 18 | var urlQuery = url.parse(window.location.href).query; |
19 | var param = qs.parse(urlQuery); | 19 | var param = qs.parse(urlQuery); |
... | @@ -25,8 +25,7 @@ class App extends React.Component { | ... | @@ -25,8 +25,7 @@ class App extends React.Component { |
25 | render(){ | 25 | render(){ |
26 | return ( | 26 | return ( |
27 | <div className="app"> | 27 | <div className="app"> |
28 | - {!this.state.isAuthenticated && <Login />} | 28 | + {this.state.isAuthenticated?(<Body />):(<Login />)} |
29 | - {this.state.isAuthenticated && <Body />} | ||
30 | </div> | 29 | </div> |
31 | ); | 30 | ); |
32 | } | 31 | } | ... | ... |
-
Please register or login to post a comment