diff --git a/ui/component/app/view.jsx b/ui/component/app/view.jsx index 9b2c64304..a8d54e4c1 100644 --- a/ui/component/app/view.jsx +++ b/ui/component/app/view.jsx @@ -30,6 +30,7 @@ import OpenInAppLink from 'web/component/openInAppLink'; import YoutubeWelcome from 'web/component/youtubeReferralWelcome'; import NagDegradedPerformance from 'web/component/nag-degraded-performance'; import NagDataCollection from 'web/component/nag-data-collection'; +import NagNoUser from 'web/component/nag-no-user'; import { useDegradedPerformance, STATUS_OK, @@ -363,7 +364,7 @@ function App(props: Props) { // Require an internal-api user on lbry.tv // This also prevents the site from loading in the un-authed state while we wait for internal-apis to return for the first time // It's not needed on desktop since there is no un-authed state - if (!user) { + if (user === undefined) { return (
@@ -428,6 +429,7 @@ function App(props: Props) { {!SIMPLE_SITE && lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && ( )} + {user === null && } {/* @endif */} )} diff --git a/ui/component/button/index.js b/ui/component/button/index.js index a2c913df7..f50b0e001 100644 --- a/ui/component/button/index.js +++ b/ui/component/button/index.js @@ -1,11 +1,12 @@ import Button from './view'; import React, { forwardRef } from 'react'; import { connect } from 'react-redux'; -import { selectUserVerifiedEmail } from 'redux/selectors/user'; +import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user'; -const mapStateToProps = state => ({ +const mapStateToProps = (state) => ({ pathname: state.router.location.pathname, emailVerified: selectUserVerifiedEmail(state), + user: selectUser(state), }); const ConnectedButton = connect(mapStateToProps)(Button); diff --git a/ui/component/button/view.jsx b/ui/component/button/view.jsx index 119e83fdf..1775ab4b8 100644 --- a/ui/component/button/view.jsx +++ b/ui/component/button/view.jsx @@ -38,6 +38,7 @@ type Props = { myref: any, dispatch: any, 'aria-label'?: string, + user: ?User, }; // use forwardRef to allow consumers to pass refs to the button content if they want to @@ -69,10 +70,14 @@ const Button = forwardRef((props: Props, ref: any) => { myref, dispatch, //
); diff --git a/ui/component/sideNavigation/view.jsx b/ui/component/sideNavigation/view.jsx index e96d69d5f..832c10070 100644 --- a/ui/component/sideNavigation/view.jsx +++ b/ui/component/sideNavigation/view.jsx @@ -295,7 +295,13 @@ function SideNavigation(props: Props) { Sign up to earn %lbc% for you and your favorite creators. -