mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 12:19:10 +00:00
[ui/header]: next/dynamic machine broke
This commit is contained in:
parent
1a75a0ac07
commit
fc10830759
1 changed files with 10 additions and 8 deletions
|
@ -1,16 +1,18 @@
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import dynamic from 'next/dynamic'
|
// import dynamic from 'next/dynamic'
|
||||||
import { User } from '../stores/user'
|
import HeaderBarAuth from '../components/header/auth'
|
||||||
import HeaderBarAuthT from '../components/header/auth'
|
import HeaderBarUnauth from '../components/header/unauth'
|
||||||
import HeaderBarUnauthT from '../components/header/unauth'
|
import { CommonProps } from '../components/header/common'
|
||||||
type Props = {
|
type Props = {
|
||||||
user?: User
|
user?: any,
|
||||||
|
noBackground?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const HeaderBarAuth = dynamic<typeof HeaderBarAuthT>(() => import('../components/header/auth'))
|
// dynamic import machine broke
|
||||||
const HeaderBarUnauth = dynamic<typeof HeaderBarUnauthT>(() => import('../components/header/unauth'))
|
// const HeaderBarAuth = dynamic<typeof HeaderBarAuthT>(() => import('../components/header/auth'))
|
||||||
|
// const HeaderBarUnauth = dynamic(() => import('../components/header/unauth'))
|
||||||
|
|
||||||
const HeaderBar = (props: Props) => {
|
const HeaderBar = (props: Props & CommonProps) => {
|
||||||
if (props.user === undefined) {
|
if (props.user === undefined) {
|
||||||
return <HeaderBarUnauth {...props} />
|
return <HeaderBarUnauth {...props} />
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue