diff --git a/app/javascript/gabsocial/layouts/profile_layout.js b/app/javascript/gabsocial/layouts/profile_layout.js index a26cd862..047605ae 100644 --- a/app/javascript/gabsocial/layouts/profile_layout.js +++ b/app/javascript/gabsocial/layouts/profile_layout.js @@ -3,6 +3,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component' import { BREAKPOINT_EXTRA_SMALL } from '../constants' import Sticky from 'react-stickynode' import { me } from '../initial_state' +import { CX } from '../constants' import LinkFooter from '../components/link_footer' import ProfileStatsPanel from '../components/panel/profile_stats_panel' import ProfileInfoPanel from '../components/panel/profile_info_panel' @@ -23,6 +24,7 @@ export default class ProfileLayout extends ImmutablePureComponent { children: PropTypes.node.isRequired, titleHTML: PropTypes.string, unavailable: PropTypes.bool, + noSidebar: PropTypes.bool, } render() { @@ -31,8 +33,16 @@ export default class ProfileLayout extends ImmutablePureComponent { children, titleHTML, unavailable, + noSidebar, } = this.props + const mainContentClasses = CX({ + default: 1, + width645PX: !noSidebar, + width1015PX: noSidebar, + z1: 1, + }) + return (
@@ -100,17 +110,20 @@ export default class ProfileLayout extends ImmutablePureComponent {
-
- -
- - - { !unavailable && } - -
-
-
-
+ { + !noSidebar && +
+ +
+ + + { !unavailable && } + +
+
+
+ } +
{children}
diff --git a/app/javascript/gabsocial/pages/profile_page.js b/app/javascript/gabsocial/pages/profile_page.js index aa326077..da430a33 100644 --- a/app/javascript/gabsocial/pages/profile_page.js +++ b/app/javascript/gabsocial/pages/profile_page.js @@ -44,6 +44,7 @@ class ProfilePage extends ImmutablePureComponent { account: ImmutablePropTypes.map, onFetchAccountByUsername: PropTypes.func.isRequired, unavailable: PropTypes.bool.isRequired, + noSidebar: PropTypes.bool, } componentDidMount() { @@ -55,6 +56,7 @@ class ProfilePage extends ImmutablePureComponent { account, children, unavailable, + noSidebar, params: { username }, } = this.props @@ -66,6 +68,7 @@ class ProfilePage extends ImmutablePureComponent { account={account} titleHTML={nameHTML} unavailable={unavailable} + noSidebar={noSidebar} > {