diff --git a/ui/component/router/view.jsx b/ui/component/router/view.jsx index 1ca39fcf2..11f873a62 100644 --- a/ui/component/router/view.jsx +++ b/ui/component/router/view.jsx @@ -190,9 +190,9 @@ function AppRouter(props: Props) { const tagParams = urlParams.get(CS.TAGS_KEY); const isLargeScreen = useIsLargeScreen(); - const homeCategoryPages = React.useMemo(() => { + const categoryPages = React.useMemo(() => { const dynamicRoutes = GetLinksData(homepageData, isLargeScreen).filter( - (potentialRoute: any) => potentialRoute && potentialRoute.route + (x: any) => x && x.route && (x.id !== 'WILD_WEST' || !wildWestDisabled) ); return dynamicRoutes.map((dynamicRouteProps: RowDataItem) => ( @@ -204,7 +204,7 @@ function AppRouter(props: Props) { )} /> )); - }, [homepageData, isLargeScreen]); + }, [homepageData, isLargeScreen, wildWestDisabled]); // For people arriving at settings page from deeplinks, know whether they can "go back" useEffect(() => { @@ -291,8 +291,7 @@ function AppRouter(props: Props) { {(!wildWestDisabled || tagParams) && } - {!wildWestDisabled && } - {homeCategoryPages} + {categoryPages} diff --git a/ui/component/sideNavigation/index.js b/ui/component/sideNavigation/index.js index c0dc75104..c01f71996 100644 --- a/ui/component/sideNavigation/index.js +++ b/ui/component/sideNavigation/index.js @@ -5,7 +5,7 @@ import { doClearClaimSearch } from 'redux/actions/claims'; import { doClearPurchasedUriSuccess } from 'redux/actions/file'; import { selectFollowedTags } from 'redux/selectors/tags'; import { selectUserVerifiedEmail, selectUser, selectOdyseeMembershipName } from 'redux/selectors/user'; -import { selectHomepageData, selectWildWestDisabled } from 'redux/selectors/settings'; +import { selectHomepageData } from 'redux/selectors/settings'; import { doSignOut } from 'redux/actions/app'; import { selectUnseenNotificationCount } from 'redux/selectors/notifications'; import { selectPurchaseUriSuccess, selectOdyseeMembershipForUri } from 'redux/selectors/claims'; @@ -21,7 +21,6 @@ const select = (state) => ({ unseenCount: selectUnseenNotificationCount(state), user: selectUser(state), homepageData: selectHomepageData(state), - wildWestDisabled: selectWildWestDisabled(state), odyseeMembership: selectOdyseeMembershipName(state), odyseeMembershipByUri: (uri) => selectOdyseeMembershipForUri(state, uri), }); diff --git a/ui/component/sideNavigation/view.jsx b/ui/component/sideNavigation/view.jsx index 2ed1a6923..318150348 100644 --- a/ui/component/sideNavigation/view.jsx +++ b/ui/component/sideNavigation/view.jsx @@ -118,12 +118,6 @@ const UNAUTH_LINKS: Array = [ }, ]; -const WILD_WEST: SideNavLink = { - title: 'Wild West', - link: `/$/${PAGES.WILD_WEST}`, - icon: ICONS.WILD_WEST, -}; - // **************************************************************************** // **************************************************************************** @@ -143,7 +137,6 @@ type Props = { doClearPurchasedUriSuccess: () => void, user: ?User, homepageData: any, - wildWestDisabled: boolean, doClearClaimSearch: () => void, odyseeMembership: string, odyseeMembershipByUri: (uri: string) => string, @@ -166,7 +159,6 @@ function SideNavigation(props: Props) { homepageData, user, followedTags, - wildWestDisabled, doClearClaimSearch, odyseeMembership, odyseeMembershipByUri, @@ -549,7 +541,6 @@ function SideNavigation(props: Props) { <> {/* $FlowFixMe: GetLinksData type needs an update */} {EXTRA_SIDEBAR_LINKS.map((linkProps) => getLink(linkProps))} - {!wildWestDisabled && getLink(WILD_WEST)} )} diff --git a/ui/constants/homepage_languages.js b/ui/constants/homepage_languages.js index 37633c412..eb7d065ac 100644 --- a/ui/constants/homepage_languages.js +++ b/ui/constants/homepage_languages.js @@ -20,4 +20,4 @@ export function getHomepageLanguage(code) { export default HOMEPAGE_LANGUAGES; -export const HOMEPAGE_EXCLUDED_CATEGORIES = Object.freeze(['NEWS']); +export const HOMEPAGE_EXCLUDED_CATEGORIES = Object.freeze(['NEWS', 'WILD_WEST']);