bigbuffet-rw/app/gabsocial/pages/groups_page.js

60 lines
1.8 KiB
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import WhoToFollowPanel from '../features/ui/components/who_to_follow_panel';
import LinkFooter from '../features/ui/components/link_footer';
import PromoPanel from '../features/ui/components/promo_panel';
import UserPanel from '../features/ui/components/user_panel';
import GroupSidebarPanel from '../features/groups/sidebar_panel';
const mapStateToProps = state => {
const me = state.get('me');
return {
account: state.getIn(['accounts', me]),
2020-04-14 11:44:40 -07:00
};
};
2020-03-27 13:59:38 -07:00
export default @connect(mapStateToProps)
class GroupsPage extends ImmutablePureComponent {
2020-04-14 11:44:40 -07:00
2020-03-27 13:59:38 -07:00
static propTypes = {
2020-04-14 11:44:40 -07:00
account: ImmutablePropTypes.map,
2020-03-27 13:59:38 -07:00
};
render() {
2020-04-14 11:44:40 -07:00
const { children } = this.props;
2020-03-27 13:59:38 -07:00
2020-04-14 11:44:40 -07:00
return (
<div className='page'>
<div className='page__columns'>
<div className='columns-area__panels'>
2020-03-27 13:59:38 -07:00
2020-04-14 11:44:40 -07:00
<div className='columns-area__panels__pane columns-area__panels__pane--left'>
<div className='columns-area__panels__pane__inner'>
<UserPanel />
<PromoPanel />
<LinkFooter />
</div>
2020-03-27 13:59:38 -07:00
</div>
2020-04-14 11:44:40 -07:00
<div className='columns-area__panels__main'>
<div className='columns-area columns-area--mobile'>
{children}
</div>
2020-03-27 13:59:38 -07:00
</div>
2020-04-14 11:44:40 -07:00
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
<div className='columns-area__panels__pane__inner'>
<GroupSidebarPanel />
<WhoToFollowPanel />
</div>
2020-03-27 13:59:38 -07:00
</div>
</div>
</div>
</div>
2020-04-14 11:44:40 -07:00
);
}
2020-03-27 13:59:38 -07:00
}