61 lines
1.6 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'
import Sticky from 'react-stickynode'
2020-04-11 18:29:19 -04:00
import Layout from './layout'
import GroupHeader from '../components/group_header'
2020-02-28 10:20:47 -05:00
export default class GroupLayout extends ImmutablePureComponent {
static propTypes = {
actions: PropTypes.array,
group: ImmutablePropTypes.map,
2020-02-29 10:42:47 -05:00
relationships: ImmutablePropTypes.map,
2020-02-28 10:20:47 -05:00
layout: PropTypes.object,
showBackBtn: PropTypes.bool,
}
render() {
2020-04-11 18:29:19 -04:00
const {
group,
children,
layout,
showBackBtn,
actions,
relationships,
} = this.props
2020-02-29 10:42:47 -05:00
const title = !!group ? group.get('title') : undefined
2020-02-28 10:20:47 -05:00
return (
2020-04-11 18:29:19 -04:00
<Layout
noRightSidebar
title={title}
actions={actions}
showBackBtn={showBackBtn}
>
2020-04-30 00:34:50 -04:00
<div className={[_s.default, _s.width100PC, _s.pl15].join(' ')}>
2020-04-11 18:29:19 -04:00
<GroupHeader group={group} relationships={relationships} />
2020-04-30 00:34:50 -04:00
<div className={[_s.default, _s.flexRow, _s.width100PC, _s.justifyContentEnd].join(' ')}>
2020-04-11 18:29:19 -04:00
<div className={[_s.default, _s.width645PX, _s.z1].join(' ')}>
<div className={_s.default}>
{children}
2020-02-28 10:20:47 -05:00
</div>
</div>
2020-04-30 00:34:50 -04:00
<div className={[_s.default, _s.ml15, _s.width340PX].join(' ')}>
2020-04-11 18:29:19 -04:00
<Sticky top={73} enabled>
<div className={[_s.default, _s.width340PX].join(' ')}>
{layout}
2020-02-29 10:42:47 -05:00
</div>
2020-04-11 18:29:19 -04:00
</Sticky>
2020-02-28 10:20:47 -05:00
</div>
</div>
2020-04-11 18:29:19 -04:00
</div>
</Layout>
2020-02-28 10:20:47 -05:00
)
}
}