Updated HomePage to show Lists, Suggestions, Groups in sidebar if PRO (for now)

• Updated:
- HomePage to show Lists, Suggestions, Groups in sidebar if PRO (for now)
This commit is contained in:
mgabdev 2021-01-13 23:23:01 -05:00
parent 05e97f741e
commit 265cdbb548
1 changed files with 16 additions and 11 deletions

View File

@ -76,6 +76,21 @@ class HomePage extends React.PureComponent {
const { lazyLoaded } = this.state const { lazyLoaded } = this.state
const title = intl.formatMessage(messages.home) const title = intl.formatMessage(messages.home)
const sidebarLayout = [
UserPanel,
ProgressPanel,
<WrappedBundle component={ProPanel} componentParams={{ isPro: isPro }} />,
<WrappedBundle component={TrendsBreakingPanel} />,
<WrappedBundle component={ShopPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded }} />,
]
if (this.props.isPro) {
sidebarLayout.push(<WrappedBundle component={ListsPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded }} />)
sidebarLayout.push(<WrappedBundle component={UserSuggestionsPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded }} />)
sidebarLayout.push(<WrappedBundle component={GroupsPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded, groupType: 'member' }} />)
}
sidebarLayout.push(LinkFooter)
return ( return (
<DefaultLayout <DefaultLayout
@ -96,17 +111,7 @@ class HomePage extends React.PureComponent {
to: '/search', to: '/search',
}, },
]} ]}
layout={[ layout={sidebarLayout}
UserPanel,
ProgressPanel,
<WrappedBundle component={ProPanel} componentParams={{ isPro: isPro }} />,
<WrappedBundle component={TrendsBreakingPanel} />,
<WrappedBundle component={ShopPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded }} />,
// <WrappedBundle component={ListsPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded }} />,
// <WrappedBundle component={UserSuggestionsPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded }} />,
// <WrappedBundle component={GroupsPanel} componentParams={{ isLazy: true, shouldLoad: lazyLoaded, groupType: 'member' }} />,
LinkFooter,
]}
> >
<PageTitle <PageTitle