68 lines
2.0 KiB
JavaScript
Raw Normal View History

2020-02-28 10:20:47 -05:00
import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
2020-02-24 16:56:07 -05:00
import Sticky from 'react-stickynode'
2020-03-14 13:31:29 -04:00
import ProfileHeader from '../components/profile_header'
2020-04-29 18:32:49 -04:00
import NavigationBar from '../components/navigation_bar'
2020-03-14 13:31:29 -04:00
2020-02-28 10:20:47 -05:00
export default class ProfileLayout extends ImmutablePureComponent {
2020-04-30 00:34:50 -04:00
2020-02-24 16:56:07 -05:00
static propTypes = {
2020-04-11 18:29:19 -04:00
children: PropTypes.node.isRequired,
2020-02-28 10:20:47 -05:00
account: ImmutablePropTypes.map,
2020-02-24 16:56:07 -05:00
layout: PropTypes.object,
title: PropTypes.string,
showBackBtn: PropTypes.bool,
}
render() {
2020-04-11 18:29:19 -04:00
const {
account,
children,
layout,
2020-04-29 18:32:49 -04:00
title,
showBackBtn,
2020-04-11 18:29:19 -04:00
} = this.props
2020-02-28 10:20:47 -05:00
2020-02-24 16:56:07 -05:00
return (
2020-04-29 18:32:49 -04:00
<div className={[_s.default, _s.width100PC, _s.heightMin100VH, _s.bgTertiary].join(' ')}>
<NavigationBar />
<main role='main' className={[_s.default, _s.width100PC].join(' ')}>
<div className={[_s.default, _s.width100PC, _s.flexRow, _s.pb15].join(' ')}>
<div className={[_s.default, _s.width100PC, _s.flexRow, _s.justifyContentSpaceBetween].join(' ')}>
<div className={[_s.default, _s.z1, _s.width100PC, _s.alignItemsCenter].join(' ')}>
2020-03-14 13:31:29 -04:00
2020-04-29 18:32:49 -04:00
<ProfileHeader account={account} />
<div className={[_s.default, _s.width1015PX,, _s.flexRow, _s.justifyContentEnd, _s.py15].join(' ')}>
<div className={[_s.default, _s.width340PX, _s.mr15].join(' ')}>
<Sticky top={63} enabled>
<div className={[_s.default, _s.width340PX].join(' ')}>
{layout}
</div>
</Sticky>
</div>
<div className={[_s.default, _s.width645PX, _s.z1].join(' ')}>
<div className={_s.default}>
{children}
</div>
2020-04-11 18:29:19 -04:00
</div>
2020-04-29 18:32:49 -04:00
</div>
2020-04-11 18:29:19 -04:00
</div>
2020-02-24 16:56:07 -05:00
</div>
2020-04-29 18:32:49 -04:00
2020-04-11 18:29:19 -04:00
</div>
2020-02-24 16:56:07 -05:00
2020-04-29 18:32:49 -04:00
</main>
</div>
2020-02-24 16:56:07 -05:00
)
}
}