From f547053ebc2c742044623ca33b160cc7588d2802 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 4 Sep 2020 16:11:28 -0400 Subject: [PATCH] add yotube sync to initial sign up flow --- ui/component/userEmailNew/view.jsx | 12 +++ ui/component/userFirstChannel/view.jsx | 13 ++- ui/component/userSignUp/index.js | 4 + ui/component/userSignUp/view.jsx | 89 ++++++++++++--------- ui/component/youtubeTransferStatus/view.jsx | 12 +-- ui/constants/action_types.js | 1 + ui/page/youtubeSync/view.jsx | 32 ++++++-- ui/redux/actions/app.js | 6 ++ ui/redux/reducers/app.js | 9 +++ ui/redux/selectors/app.js | 2 + ui/store.js | 1 + 11 files changed, 125 insertions(+), 56 deletions(-) diff --git a/ui/component/userEmailNew/view.jsx b/ui/component/userEmailNew/view.jsx index d69528737..f1c844ec1 100644 --- a/ui/component/userEmailNew/view.jsx +++ b/ui/component/userEmailNew/view.jsx @@ -23,6 +23,8 @@ type Props = { setShareDiagnosticData: boolean => void, doSignUp: (string, ?string) => Promise, clearEmailEntry: () => void, + interestedInYoutubSync: boolean, + doToggleInterestedInYoutubeSync: () => void, }; function UserEmailNew(props: Props) { @@ -35,6 +37,8 @@ function UserEmailNew(props: Props) { setShareDiagnosticData, clearEmailEntry, emailExists, + interestedInYoutubSync, + doToggleInterestedInYoutubeSync, } = props; const { share_usage_data: shareUsageData } = daemonSettings; const { push, location } = useHistory(); @@ -113,6 +117,14 @@ function UserEmailNew(props: Props) { onChange={e => setPassword(e.target.value)} /> + doToggleInterestedInYoutubeSync()} + /> + {!IS_WEB && ( void, }; function UserFirstChannel(props: Props) { - const { createChannel, creatingChannel, claimingReward, user, createChannelError } = props; + const { + createChannel, + creatingChannel, + claimingReward, + user, + createChannelError, + doToggleInterestedInYoutubeSync, + } = props; const { primary_email: primaryEmail } = user; const initialChannel = primaryEmail ? primaryEmail.split('@')[0] : ''; const [channel, setChannel] = useState(initialChannel); @@ -87,7 +94,7 @@ function UserFirstChannel(props: Props) {