mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 02:29:10 +00:00
landing-mock start
This commit is contained in:
parent
5a87a497bb
commit
7e0379ec3c
7 changed files with 46 additions and 25 deletions
|
@ -1,30 +1,21 @@
|
|||
// @flow
|
||||
import * as React from 'react'
|
||||
import dynamic from 'next/dynamic'
|
||||
import { withRedux } from '../config/redux'
|
||||
import { bindActionCreators } from 'redux'
|
||||
import { connect } from 'react-redux'
|
||||
import { namespaceConfig } from 'fast-redux'
|
||||
import * as User from './user'
|
||||
import { type User } from './user'
|
||||
|
||||
type Props = {
|
||||
user: User.User
|
||||
user: ?User
|
||||
}
|
||||
|
||||
const HeaderBarAuth = dynamic(() => import('../components/header/auth'))
|
||||
const HeaderBarUnauth = dynamic(() => import('../components/header/unauth'))
|
||||
|
||||
const HeaderBar: React.StatelessFunctionalComponent<Props> = () => {
|
||||
// if ()
|
||||
return null
|
||||
const HeaderBar: React.StatelessFunctionalComponent<Props> = (props) => {
|
||||
if (props.user == null) {
|
||||
return <HeaderBarUnauth {...props} />
|
||||
} else {
|
||||
return <HeaderBarAuth {...props} />
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = (state): Props => {
|
||||
return {}
|
||||
}
|
||||
|
||||
function mapDispatchToProps (dispatch) {
|
||||
return bindActionCreators({ }, dispatch)
|
||||
}
|
||||
|
||||
export default withRedux(connect(mapStateToProps, mapDispatchToProps)(HeaderBar))
|
||||
export default HeaderBar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue