mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 12:19:10 +00:00
21 lines
521 B
JavaScript
21 lines
521 B
JavaScript
// @flow
|
|
import * as React from 'react'
|
|
import dynamic from 'next/dynamic'
|
|
import { type User } from './user'
|
|
|
|
type Props = {
|
|
user: ?User
|
|
}
|
|
|
|
const HeaderBarAuth = dynamic(() => import('../components/header/auth'))
|
|
const HeaderBarUnauth = dynamic(() => import('../components/header/unauth'))
|
|
|
|
const HeaderBar: React.StatelessFunctionalComponent<Props> = (props) => {
|
|
if (props.user == null) {
|
|
return <HeaderBarUnauth {...props} />
|
|
} else {
|
|
return <HeaderBarAuth {...props} />
|
|
}
|
|
}
|
|
|
|
export default HeaderBar
|