fix recommended showing blank on homepage

This commit is contained in:
Thomas Zarebczan 2022-03-28 10:01:55 -04:00
parent 726dc77943
commit 157b6d3f19
No known key found for this signature in database
GPG key ID: 767B41E1BB7346F2
2 changed files with 11 additions and 7 deletions

View file

@ -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) => ({

View file

@ -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,6 +100,7 @@ function HomePage(props: Props) {
// always inject FYP is homepage not customized, hide news.
if (key.id === 'FOLLOWING') {
sortedRowData.push(key);
hasMembership &&
sortedRowData.push({
id: 'FYP',
title: 'Recommended',