mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
absolutely massive typescript porting time
This commit is contained in:
parent
01f238f515
commit
30d08a630f
159 changed files with 2563 additions and 3861 deletions
21
packages/roleypoly-ui/containers/header-bar.tsx
Normal file
21
packages/roleypoly-ui/containers/header-bar.tsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import * as React from 'react'
|
||||
import dynamic from 'next/dynamic'
|
||||
import { User } from '../stores/user'
|
||||
import HeaderBarAuthT from '../components/header/auth'
|
||||
import HeaderBarUnauthT from '../components/header/unauth'
|
||||
type Props = {
|
||||
user?: User
|
||||
}
|
||||
|
||||
const HeaderBarAuth = dynamic<typeof HeaderBarAuthT>(() => import('../components/header/auth'))
|
||||
const HeaderBarUnauth = dynamic<typeof HeaderBarUnauthT>(() => import('../components/header/unauth'))
|
||||
|
||||
const HeaderBar = (props: Props) => {
|
||||
if (props.user === undefined) {
|
||||
return <HeaderBarUnauth {...props} />
|
||||
} else {
|
||||
return <HeaderBarAuth {...props} />
|
||||
}
|
||||
}
|
||||
|
||||
export default HeaderBar
|
Loading…
Add table
Add a link
Reference in a new issue