aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vnext/src/App.js16
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>