diff --git a/ui/page/home/index.js b/ui/page/home/index.js index 154505f65..a70c7afd2 100644 --- a/ui/page/home/index.js +++ b/ui/page/home/index.js @@ -1,13 +1,17 @@ +import * as SETTINGS from 'constants/settings'; import { connect } from 'react-redux'; import { selectFollowedTags } from 'lbry-redux'; import { selectUserVerifiedEmail } from 'redux/selectors/user'; import { selectSubscriptions } from 'redux/selectors/subscriptions'; +import { makeSelectClientSetting } from 'redux/selectors/settings'; + import DiscoverPage from './view'; const select = state => ({ followedTags: selectFollowedTags(state), subscribedChannels: selectSubscriptions(state), authenticated: selectUserVerifiedEmail(state), + showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state), }); const perform = {}; diff --git a/ui/page/home/view.jsx b/ui/page/home/view.jsx index e901efa83..4432a5172 100644 --- a/ui/page/home/view.jsx +++ b/ui/page/home/view.jsx @@ -14,10 +14,11 @@ type Props = { authenticated: boolean, followedTags: Array, subscribedChannels: Array, + showNsfw: boolean, }; function HomePage(props: Props) { - const { followedTags, subscribedChannels, authenticated } = props; + const { followedTags, subscribedChannels, authenticated, showNsfw } = props; const showPersonalizedChannels = (authenticated || !IS_WEB) && subscribedChannels && subscribedChannels.length > 0; const showPersonalizedTags = (authenticated || !IS_WEB) && followedTags && followedTags.length > 0; const showIndividualTags = showPersonalizedTags && followedTags.length < 5; @@ -28,7 +29,8 @@ function HomePage(props: Props) { showPersonalizedTags, subscribedChannels, followedTags, - showIndividualTags + showIndividualTags, + showNsfw ); return ( diff --git a/ui/util/homepage.js b/ui/util/homepage.js index b9a2a7c7a..a6eadd550 100644 --- a/ui/util/homepage.js +++ b/ui/util/homepage.js @@ -21,7 +21,8 @@ export default function GetHomePageRowData( showPersonalizedTags: boolean, subscribedChannels: Array, followedTags: Array, - showIndividualTags: boolean + showIndividualTags: boolean, + showNsfw: boolean ) { const isLargeScreen = useIsLargeScreen();