diff --git a/ui/component/youtubeWelcome/index.js b/ui/component/youtubeWelcome/index.js index f05d0ad7f..7d061e14e 100644 --- a/ui/component/youtubeWelcome/index.js +++ b/ui/component/youtubeWelcome/index.js @@ -1,9 +1,14 @@ import { connect } from 'react-redux'; import { doOpenModal } from 'redux/actions/app'; +import { selectUser } from 'lbryinc'; import YoutubeWelcome from './view'; +const select = state => ({ + user: selectUser(state), +}); + export default connect( - null, + select, { doOpenModal, } diff --git a/ui/component/youtubeWelcome/view.jsx b/ui/component/youtubeWelcome/view.jsx index e149d6719..7b7dd82ac 100644 --- a/ui/component/youtubeWelcome/view.jsx +++ b/ui/component/youtubeWelcome/view.jsx @@ -3,13 +3,13 @@ import * as MODALS from 'constants/modal_types'; import React from 'react'; import usePersistedState from 'effects/use-persisted-state'; -type Props = { doOpenModal: string => void }; +type Props = { doOpenModal: string => void, user: ?User }; const YoutubeWelcome = (props: Props) => { - const { doOpenModal } = props; + const { doOpenModal, user } = props; const [hasBeenShownIntro, setHasBeenShownIntro] = usePersistedState('youtube-welcome', false); const isYouTubeReferrer = document.referrer.includes('youtube.com'); - const shouldShowWelcome = !hasBeenShownIntro && isYouTubeReferrer; + const shouldShowWelcome = !hasBeenShownIntro && isYouTubeReferrer && user && !user.has_verified_email; React.useEffect(() => { if (shouldShowWelcome) { diff --git a/ui/modal/modalYoutubeWelcome/view.jsx b/ui/modal/modalYoutubeWelcome/view.jsx index f3f8cdcf9..17312358a 100644 --- a/ui/modal/modalYoutubeWelcome/view.jsx +++ b/ui/modal/modalYoutubeWelcome/view.jsx @@ -1,4 +1,5 @@ // @flow +import * as PAGES from 'constants/pages'; import React from 'react'; import { Modal } from 'modal/modal'; import Card from 'component/common/card'; @@ -14,11 +15,30 @@ const YoutubeWelcome = (props: Props) => { } + title={__("You're Free!")} + subtitle={ + +

+ {__("You've escaped the land of spying, censorship, and exploitation.")} + 💩 +

+

+ {__('Welcome to the land of content freedom.')} + 🌈 +

+
+ } + actions={ + +