Added functionality to pages, layout for use with sidebar promotions

• Added:
- functionality to pages, layout for use with sidebar promotions

• Updated:
- pages, layouts to use StatusPromotionPanel
This commit is contained in:
mgabdev
2020-07-15 23:05:08 -05:00
parent 15c7ff1eba
commit 06d85fe8d8
18 changed files with 147 additions and 128 deletions

View File

@@ -6,9 +6,10 @@ export default class DefaultLayout extends PureComponent {
actions: PropTypes.array,
children: PropTypes.node.isRequired,
layout: PropTypes.object,
showBackBtn: PropTypes.bool,
noComposeButton: PropTypes.bool,
noRightSidebar: PropTypes.bool,
page: PropTypes.string,
showBackBtn: PropTypes.bool,
tabs: PropTypes.array,
title: PropTypes.string.isRequired,
}
@@ -18,22 +19,24 @@ export default class DefaultLayout extends PureComponent {
actions,
children,
layout,
noComposeButton,
noRightSidebar,
page,
showBackBtn,
tabs,
title,
noComposeButton,
noRightSidebar,
} = this.props
return (
<Layout
actions={actions}
layout={layout}
noComposeButton={noComposeButton}
noRightSidebar={noRightSidebar}
page={page}
showBackBtn={showBackBtn}
tabs={tabs}
title={title}
noComposeButton={noComposeButton}
noRightSidebar={noRightSidebar}
>
{children}
</Layout>

View File

@@ -8,6 +8,7 @@ import WhoToFollowPanel from '../components/panel/who_to_follow_panel'
import GroupSidebarPanel from '../components/panel/groups_panel'
import LinkFooter from '../components/link_footer'
import GroupHeader from '../components/group_header'
import SidebarPanelGroup from '../components/sidebar_panel_group'
import Responsive from '../features/ui/util/responsive_component';
export default class GroupLayout extends ImmutablePureComponent {
@@ -16,6 +17,7 @@ export default class GroupLayout extends ImmutablePureComponent {
actions: PropTypes.array,
children: PropTypes.node,
group: ImmutablePropTypes.map,
groupId: PropTypes.string,
layout: PropTypes.object,
relationships: ImmutablePropTypes.map,
showBackBtn: PropTypes.bool,
@@ -27,6 +29,7 @@ export default class GroupLayout extends ImmutablePureComponent {
actions,
children,
group,
groupId,
layout,
relationships,
showBackBtn,
@@ -40,6 +43,7 @@ export default class GroupLayout extends ImmutablePureComponent {
actions={actions}
showBackBtn={showBackBtn}
title={title}
page='group'
>
<Responsive max={BREAKPOINT_EXTRA_SMALL}>
<div className={[_s.default, _s.width100PC].join(' ')}>
@@ -70,10 +74,15 @@ export default class GroupLayout extends ImmutablePureComponent {
<div className={[_s.default, _s.ml15, _s.width340PX].join(' ')}>
<Sticky top={73} enabled>
<div className={[_s.default, _s.width340PX].join(' ')}>
<GroupInfoPanel group={group} />
<WhoToFollowPanel />
<GroupSidebarPanel isSlim />
<LinkFooter />
<SidebarPanelGroup
page={`group.${groupId}`}
layout={[
<GroupInfoPanel group={group} key='group-page-info-panel' />,
<WhoToFollowPanel key='group-page-wtf-panel' />,
<GroupSidebarPanel isSlim key='group-page-group-panel' />,
<LinkFooter key='group-page-link-footer' />,
]}
/>
</div>
</Sticky>
</div>

View File

@@ -6,6 +6,7 @@ import {
import { me } from '../initial_state'
import Sidebar from '../components/sidebar'
import SidebarXS from '../components/sidebar_xs'
import SidebarPanelGroup from '../components/sidebar_panel_group'
import NavigationBar from '../components/navigation_bar'
import LoggedOutNavigationBar from '../components/logged_out_navigation_bar'
import FooterBar from '../components/footer_bar'
@@ -19,10 +20,11 @@ export default class Layout extends PureComponent {
static propTypes = {
actions: PropTypes.array,
children: PropTypes.node,
layout: PropTypes.object,
layout: PropTypes.array,
noComposeButton: PropTypes.bool,
noRightSidebar: PropTypes.bool,
noSidebar: PropTypes.bool,
page: PropTypes.string,
showBackBtn: PropTypes.bool,
tabs: PropTypes.array,
title: PropTypes.string,
@@ -36,6 +38,7 @@ export default class Layout extends PureComponent {
noComposeButton,
noRightSidebar,
noSidebar,
page,
showBackBtn,
tabs,
title,
@@ -126,7 +129,7 @@ export default class Layout extends PureComponent {
<div className={[_s.default, _s.width340PX, _s.ml15].join(' ')}>
<Sticky top={73} enabled>
<div className={[_s.default, _s.width340PX].join(' ')}>
{layout}
<SidebarPanelGroup layout={layout} page={page} />
</div>
</Sticky>
</div>