use ENABLE_MATURE

This commit is contained in:
zeppi 2021-07-06 14:16:57 -04:00 committed by jessopb
parent 6b2569e5f2
commit 9af3380af7
3 changed files with 5 additions and 4 deletions

View file

@ -71,7 +71,8 @@ STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
# SIMPLE_SITE REPLACEMENTS
#ENABLE_MATURE=true
ENABLE_MATURE=true
ENABLE_UI_NOTIFICATIONS=false
#VIDEO_ENABLED=true
#AUDIO_ENABLED=true
@ -87,6 +88,5 @@ STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
#USE_FOOTER=true
#USE_DISCOVER_WHITELIST=false
#ENABLE_WILD_WEST=false
ENABLE_UI_NOTIFICATIONS=false
#FULL_SIDE_LINKS=true
#

View file

@ -51,6 +51,7 @@ const config = {
KNOWN_APP_DOMAINS: process.env.KNOWN_APP_DOMAINS ? process.env.KNOWN_APP_DOMAINS.split(',') : [],
STRIPE_PUBLIC_KEY: process.env.STRIPE_PUBLIC_KEY,
ENABLE_UI_NOTIFICATIONS: process.env.ENABLE_UI_NOTIFICATIONS === 'true',
ENABLE_MATURE: process.env.ENABLE_MATURE === 'true',
};
config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`;

View file

@ -1,7 +1,7 @@
import { SETTINGS, DAEMON_SETTINGS } from 'lbry-redux';
import { createSelector } from 'reselect';
import homepages from 'homepages';
import { SIMPLE_SITE } from 'config';
import { ENABLE_MATURE } from 'config';
import { getDefaultHomepageKey, getDefaultLanguage } from 'util/default-languages';
const selectState = (state) => state.settings || {};
@ -22,7 +22,7 @@ export const makeSelectClientSetting = (setting) =>
createSelector(selectClientSettings, (settings) => (settings ? settings[setting] : undefined));
// refactor me
export const selectShowMatureContent = SIMPLE_SITE
export const selectShowMatureContent = !ENABLE_MATURE
? createSelector(() => false)
: makeSelectClientSetting(SETTINGS.SHOW_MATURE);