From f12145eb4797e915dc608405e7838846803d464e Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:49:44 -0400 Subject: [PATCH] Added HomePage for use with components that require all home page related features such as compose, user panel, etc. --- app/javascript/gabsocial/pages/home_page.js | 58 +++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 app/javascript/gabsocial/pages/home_page.js diff --git a/app/javascript/gabsocial/pages/home_page.js b/app/javascript/gabsocial/pages/home_page.js new file mode 100644 index 00000000..931fae4c --- /dev/null +++ b/app/javascript/gabsocial/pages/home_page.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import { me } from 'gabsocial/initial_state'; +import PropTypes from 'prop-types'; +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 ComposeFormContainer from '../features/compose/containers/compose_form_container'; +import Avatar from '../components/avatar'; + +const mapStateToProps = state => ({ + account: state.getIn(['accounts', me]), +}); + +export default @connect(mapStateToProps) +class HomePage extends ImmutablePureComponent { + render () { + const {children, account} = this.props; + + return ( +