Commit a27d9604 authored by 神楽坂玲奈's avatar 神楽坂玲奈

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/models/auth.js
#	src/routes/Index.js
parents 861e9909 bcd4546f
This diff is collapsed.
......@@ -24,7 +24,7 @@ export default {
signOut(state) {
console.log('sign out');
localStorage.removeItem('token');
localStorage.removeItem('user');
location.href = '/';
return state;
},
change(state, action) {
......
......@@ -29,5 +29,4 @@ function mapStateToProps(state) {
loading,
};
}
export default connect(mapStateToProps)(Active);
......@@ -124,12 +124,12 @@ const particleConfig = {
function Index({ children, messages, dispatch }) {
return (
<div style={{ display: 'flex', flexDirection: 'column', minHeight: '100%' }}>
<DocumentTitle title={messages.title || 'Moe Cube'}/>
<div style={{ height: '100%'}}>
<DocumentTitle title={messages.title || 'Moe Cube'} />
<Header style={{ display: 'flex', alignItems: 'center' }}>
<Link to="/" style={{ marginTop: '20px' }}>
<img src={logo} style={{ width: '140px', height: '44px' }} alt="logo"/>
<img src={logo} style={{ width: '140px', height: '44px' }}/>
</Link>
<Menu
......@@ -151,15 +151,11 @@ function Index({ children, messages, dispatch }) {
defaultSelectedKeys={['1']}
style={{ lineHeight: '64px', position: 'absolute', right: '50px' }}
>
{localStorage.getItem('user') ? (<Menu.Item key="1">
<div
onClick={() => {
dispatch({ type: 'auth/signOut' });
}}
>
{localStorage.getItem('token') ? (<Menu.Item key="1">
<div onClick={() => { dispatch({ type : 'auth/signOut' }) }}>
<Format id="sign-out"/>
</div>
</Menu.Item>) : (<div/>)
</Menu.Item>):('')
}
</Menu>
</Header>
......@@ -172,7 +168,7 @@ function Index({ children, messages, dispatch }) {
/>
{children}
<Footer style={{ position: 'absolute', width: '100%' }}>
<Footer style={{ position: 'absolute', width: '100%'}}>
<div>© MoeCube 2017 all right reserved.</div>
</Footer>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment