gab-social/app/javascript/gabsocial/pages/home_page.js
mgabdev 3d509c84a2 Another large update for all components
reorganization, linting, updating file imports, consolidation
warning: there will be errors in this commit
todo: update webpack, add missing styles, scss files, consolidate group page components.
2019-08-09 12:06:27 -04:00

52 lines
1.5 KiB
JavaScript

import { Fragment } from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import WhoToFollowPanel from '../components/panel';
import LinkFooter from '../components/link_footer';
import PromoPanel from '../components/promo_panel';
import UserPanel from '../components/user_panel';
import ComposeFormContainer from '../features/compose/containers/compose_form_container';
import Avatar from '../components/avatar';
import GroupSidebarPanel from '../features/groups/sidebar_panel';
import { me } from '../initial_state';
import ColumnsArea from '../components/columns_area';
const mapStateToProps = state => ({
account: state.getIn(['accounts', me]),
});
export default @connect(mapStateToProps)
class HomePage extends ImmutablePureComponent {
render () {
const {children, account} = this.props;
return (
<ColumnsArea
layout={{
TOP: null,
RIGHT: (
<Fragment>
<GroupSidebarPanel />
{/*<WhoToFollowPanel />*/}
</Fragment>
),
LEFT: (
<Fragment>
<UserPanel />
<PromoPanel />
<LinkFooter />
</Fragment>
)
}}
>
<div className='timeline-compose-block'>
<div className='timeline-compose-block__avatar'>
<Avatar account={account} size={46} />
</div>
<ComposeFormContainer shouldCondense={true} autoFocus={false} />
</div>
{children}
</ColumnsArea>
)
}
}