import React from 'react'; import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ComposeFormContainer from '../features/compose/containers/compose_form_container'; import Avatar from '../components/avatar'; // import GroupSidebarPanel from '../features/groups/sidebar_panel'; const mapStateToProps = state => { const me = state.get('me'); return { me, account: state.getIn(['accounts', me]), }; }; export default @connect(mapStateToProps) class HomePage extends ImmutablePureComponent { constructor(props) { super(props); this.composeBlock = React.createRef(); } static defaultProps = { layout: { LEFT: null, RIGHT: null }, } render() { const { me, children, account } = this.props; const LAYOUT = this.props.layout || this.defaultProps.layout; return (
{LAYOUT.LEFT}
{me &&
} {children}
{LAYOUT.RIGHT}
); } }