Skip to content

Commit

Permalink
(#221) Inline the login button.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause committed Jun 2, 2017
1 parent 0a0f4c4 commit 1d24f91
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/client/components/header/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,17 @@ const mapStateToProps = state => ({
hasAuth: selectors.hasToken(state)
})

const LoginButton = ({ onLogin }) => (
<RaisedButton
label="Inloggen"
labelColor={colors.white}
backgroundColor={colors.green}
style={{ backgroundColor: 'none' }}
onTouchTap={onLogin}
/>
)

LoginButton.propTypes = { onLogin: PropTypes.func.isRequired }

export const DumbHeader = ({ hasAuth, history }) => (
<Wrapper>
<Logo />
{hasAuth
? <ProfileWidget />
: <LoginButton
onLogin={() => {
: <RaisedButton
label="Inloggen"
labelColor={colors.white}
backgroundColor={colors.green}
style={{ backgroundColor: 'none' }}
onTouchTap={() => {
history.push('/login')
}}
/>}
Expand Down

0 comments on commit 1d24f91

Please sign in to comment.