diff options
author | Vitaly Takmazov | 2018-06-20 01:06:41 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:52 +0300 |
commit | 95f9a337435091188b02d4545b7507f47fef34cc (patch) | |
tree | 653bea7db4912e83aa16c996c7f1d9135e1fdd2f | |
parent | adef6007788557b4a5847de67049c14f32975d1b (diff) |
fix visitor avatar refresh
-rw-r--r-- | vnext/src/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js index a5bfa1c5..0a8eb369 100644 --- a/vnext/src/index.js +++ b/vnext/src/index.js @@ -18,7 +18,7 @@ class App extends React.Component { this.auth = this.auth.bind(this); this.state = { visitor: { - uid: window.localStorage.uid || 0, + uid: Number(window.localStorage.uid) || 0, hash: window.localStorage.hash || '' }, headerClassName: '' @@ -89,7 +89,7 @@ class App extends React.Component { <div id="header_wrapper"> {this.state.visitor.uid > 0 ? <div id="ctitle"> - <Avatar user={this.state.visitor} /> + { this.state.visitor.uname ? <Avatar user={this.state.visitor} /> : <Icon name="ei-spinner" size="m" /> } </div> : <div id="logo"><Link to="/">Juick</Link></div> |