fix recommended showing blank on homepage
This commit is contained in:
parent
726dc77943
commit
157b6d3f19
2 changed files with 11 additions and 7 deletions
|
@ -5,7 +5,7 @@ import { doFetchActiveLivestreams } from 'redux/actions/livestream';
|
|||
import { selectAdBlockerFound } from 'redux/selectors/app';
|
||||
import { selectActiveLivestreams, selectFetchingActiveLivestreams } from 'redux/selectors/livestream';
|
||||
import { selectFollowedTags } from 'redux/selectors/tags';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectHasOdyseeMembership, selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
||||
import { selectShowMatureContent, selectHomepageData, selectClientSetting } from 'redux/selectors/settings';
|
||||
|
||||
|
@ -22,6 +22,7 @@ const select = (state) => ({
|
|||
hideScheduledLivestreams: selectClientSetting(state, SETTINGS.HIDE_SCHEDULED_LIVESTREAMS),
|
||||
adBlockerFound: selectAdBlockerFound(state),
|
||||
homepageOrder: selectClientSetting(state, SETTINGS.HOMEPAGE_ORDER),
|
||||
hasMembership: selectHasOdyseeMembership(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
|
|
|
@ -40,6 +40,7 @@ type Props = {
|
|||
adBlockerFound: ?boolean,
|
||||
homepageOrder: HomepageOrder,
|
||||
doOpenModal: (id: string, ?{}) => void,
|
||||
hasMembership: boolean,
|
||||
};
|
||||
|
||||
function HomePage(props: Props) {
|
||||
|
@ -56,6 +57,7 @@ function HomePage(props: Props) {
|
|||
adBlockerFound,
|
||||
homepageOrder,
|
||||
doOpenModal,
|
||||
hasMembership,
|
||||
} = props;
|
||||
|
||||
const showPersonalizedChannels = (authenticated || !IS_WEB) && subscribedChannels && subscribedChannels.length > 0;
|
||||
|
@ -98,12 +100,13 @@ function HomePage(props: Props) {
|
|||
// always inject FYP is homepage not customized, hide news.
|
||||
if (key.id === 'FOLLOWING') {
|
||||
sortedRowData.push(key);
|
||||
sortedRowData.push({
|
||||
id: 'FYP',
|
||||
title: 'Recommended',
|
||||
icon: ICONS.GLOBE,
|
||||
link: `/$/${PAGES.FYP}`,
|
||||
});
|
||||
hasMembership &&
|
||||
sortedRowData.push({
|
||||
id: 'FYP',
|
||||
title: 'Recommended',
|
||||
icon: ICONS.GLOBE,
|
||||
link: `/$/${PAGES.FYP}`,
|
||||
});
|
||||
} else if (key.id !== 'NEWS') {
|
||||
sortedRowData.push(key);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue