From ae6551317575cf4b9344ad8671f4771edd7656d7 Mon Sep 17 00:00:00 2001 From: adcpm Date: Wed, 11 Jan 2017 09:48:45 +0700 Subject: [PATCH 1/4] Allow unlogged user --- src/wrapper.js | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/wrapper.js b/src/wrapper.js index 79abd6cd53..8c2f3999e2 100644 --- a/src/wrapper.js +++ b/src/wrapper.js @@ -2,16 +2,12 @@ import React, { Component, PropTypes } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { IntlProvider } from 'react-intl'; - import { login } from './auth/authActions'; import { getConfig, getRate } from './actions'; import { getStoredBookmarks } from './bookmarks/bookmarksActions'; import { notify } from './app/Notification/notificationActions'; import Notification from './app/Notification/Notification'; import Sidebar from './app/Sidebar'; -import Splash from './app/Splash'; -import Loading from './widgets/Loading'; -import Modal from './widgets/Modal'; import * as messages from './translations/Translations'; import * as reblogActions from './app/Reblog/reblogActions'; @@ -44,21 +40,14 @@ export default class Wrapper extends Component { const className = (!app.sidebarIsVisible) ? 'app-wrapper full-width' : 'app-wrapper'; return ( - { auth.isFetching ? - - - - : auth.isAuthenticated - ?
- - - {React.cloneElement( - this.props.children, - { auth, notify } - )} -
- : - } +
+ + + { React.cloneElement( + this.props.children, + { auth, notify } + )} +
); } From 2c803fc15e32f7e5fcafd105366c3292de7a7773 Mon Sep 17 00:00:00 2001 From: adcpm Date: Wed, 11 Jan 2017 09:49:32 +0700 Subject: [PATCH 2/4] Add SidebarHeader comp --- src/app/Sidebar.js | 29 ++++++------------- src/app/Sidebar/SidebarHeader.js | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 20 deletions(-) create mode 100644 src/app/Sidebar/SidebarHeader.js diff --git a/src/app/Sidebar.js b/src/app/Sidebar.js index b3b9c8b6e4..8a1a5d66b8 100644 --- a/src/app/Sidebar.js +++ b/src/app/Sidebar.js @@ -11,7 +11,7 @@ import api from '../steemAPI'; import { hideSidebar } from '../actions'; import Loading from '../widgets/Loading'; import Icon from '../widgets/Icon'; -import Avatar from '../widgets/Avatar'; +import SidebarHeader from './Sidebar/SidebarHeader'; import SidebarTabs from './Sidebar/SidebarTabs'; import SidebarUsers from './Sidebar/SidebarUsers'; import './Sidebar.scss'; @@ -157,7 +157,8 @@ export default class Sidebar extends Component { render() { const { search, props, menu } = this.state; - const { auth: { user }, app: { rate } } = this.props; + const { auth, app: { rate }, hideSidebar } = this.props; + const { user } = auth; const power = props ? formatter.vestToSteem( @@ -174,24 +175,12 @@ export default class Sidebar extends Component { return (