diff options
author | Vitaly Takmazov | 2019-03-11 15:21:52 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:54 +0300 |
commit | 9efaac1e0f6863f9791465ecca07cc57be35b21c (patch) | |
tree | 8673e3fec6f8a980ea728e11acbb316d5398c6dc | |
parent | 8c0984c22000b27d84b8e2d883f8f1dacf6c6208 (diff) |
Layout changes
-rw-r--r-- | vnext/src/App.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/vnext/src/App.js b/vnext/src/App.js index a519eedd..54326220 100644 --- a/vnext/src/App.js +++ b/vnext/src/App.js @@ -12,6 +12,7 @@ import Post from './components/Post'; import Thread from './components/Thread'; import LoginButton from './components/LoginButton'; import Avatar from './components/Avatar'; +import { UserLink } from './components/UserInfo'; import Header from './components/Header'; import SearchBox from './components/SearchBox'; import NavigationIcon from './components/NavigationIcon'; @@ -90,18 +91,6 @@ export default class App extends React.Component { location.search = `?search=${searchString}`; history.push(location); } - toggleSidebar = () => { - const isDesktop = window.matchMedia('(min-width: 62.5rem)'); - if (!isDesktop.matches) { - let width = this.sidebar.current.style.width; - this.sidebar.current.style.width = width === '248px' ? '0' : '248px'; - let leftMargin = this.state.appMarginLeft === 'inherit' ? '250px' : 'inherit'; - this.setState({ - appMarginLeft: leftMargin - }); - app.style.marginLeft = leftMargin; - } - } render() { const user = this.state.visitor; return ( @@ -111,7 +100,7 @@ export default class App extends React.Component { <div id="header_wrapper"> { user.uid > 0 ? - <NavigationIcon onToggle={this.toggleSidebar} /> + <UserLink user={user} /> : <div id="logo"> <Link to="/">Juick</Link> </div> @@ -173,7 +162,6 @@ export default class App extends React.Component { { user.uid > 0 && <aside id="sidebar" ref={this.sidebar}> - <Avatar user={user} /> <Link to="/?show=my" onClick={this.toggleSidebar}> <Icon name="ei-clock" size="s" /> <span className="desktop">My feed</span> |