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

61 lines
1.8 KiB
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import GroupSidebarPanel from '../features/groups/sidebar_panel';
2020-03-27 13:59:38 -07:00
import LinkFooter from '../features/ui/components/link_footer';
import PromoPanel from '../features/ui/components/promo_panel';
import UserPanel from '../features/ui/components/user_panel';
2022-03-21 11:09:01 -07:00
import WhoToFollowPanel from '../features/ui/components/who-to-follow-panel';
2020-03-27 13:59:38 -07:00
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 = {
2022-03-23 10:14:42 -07:00
account: ImmutablePropTypes.record,
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'>
2020-04-14 11:44:40 -07:00
{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
}