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 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 (
<DefaultLayout
@ -96,17 +111,7 @@ class HomePage extends React.PureComponent {
to: '/search',
},
]}
layout={[
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,
]}
layout={sidebarLayout}
>
<PageTitle