|
|
|
@ -2,6 +2,8 @@ import type { ReactNode } from 'react' |
|
|
|
import { Fragment } from 'react' |
|
|
|
import { Fragment } from 'react' |
|
|
|
import { Link } from 'react-router-dom' |
|
|
|
import { Link } from 'react-router-dom' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import isNull from 'lodash/isNull' |
|
|
|
|
|
|
|
|
|
|
|
import { PAGES } from 'config' |
|
|
|
import { PAGES } from 'config' |
|
|
|
|
|
|
|
|
|
|
|
import { Menu } from 'features/Menu' |
|
|
|
import { Menu } from 'features/Menu' |
|
|
|
@ -19,6 +21,7 @@ import { |
|
|
|
type Props = { |
|
|
|
type Props = { |
|
|
|
children?: ReactNode, |
|
|
|
children?: ReactNode, |
|
|
|
color?: string, |
|
|
|
color?: string, |
|
|
|
|
|
|
|
headerImage?: string | null, |
|
|
|
height?: number, |
|
|
|
height?: number, |
|
|
|
profileId?: number, |
|
|
|
profileId?: number, |
|
|
|
} |
|
|
|
} |
|
|
|
@ -26,19 +29,25 @@ type Props = { |
|
|
|
export const ProfileHeader = ({ |
|
|
|
export const ProfileHeader = ({ |
|
|
|
children, |
|
|
|
children, |
|
|
|
color: headerColor, |
|
|
|
color: headerColor, |
|
|
|
|
|
|
|
headerImage, |
|
|
|
height, |
|
|
|
height, |
|
|
|
profileId, |
|
|
|
profileId, |
|
|
|
}: Props) => { |
|
|
|
}: Props) => { |
|
|
|
const color = useProfileColor(profileId) |
|
|
|
const color = useProfileColor(profileId) |
|
|
|
|
|
|
|
const noShadow = !isNull(headerImage) |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Fragment> |
|
|
|
<Fragment> |
|
|
|
<HeaderStyled color={headerColor || color} height={height}> |
|
|
|
<HeaderStyled |
|
|
|
|
|
|
|
headerImage={headerImage} |
|
|
|
|
|
|
|
color={headerColor || color} |
|
|
|
|
|
|
|
height={height} |
|
|
|
|
|
|
|
> |
|
|
|
<Position left={1.7}> |
|
|
|
<Position left={1.7}> |
|
|
|
<HeaderGroup marginTop={0.19}> |
|
|
|
<HeaderGroup marginTop={0.19}> |
|
|
|
<Link to={PAGES.home}> |
|
|
|
<Link to={PAGES.home}> |
|
|
|
<HeaderLogo /> |
|
|
|
<HeaderLogo /> |
|
|
|
</Link> |
|
|
|
</Link> |
|
|
|
<Search /> |
|
|
|
<Search noShadow={noShadow} /> |
|
|
|
</HeaderGroup> |
|
|
|
</HeaderGroup> |
|
|
|
</Position> |
|
|
|
</Position> |
|
|
|
|
|
|
|
|
|
|
|
|