From 5f5329361a19894e2331de4b8663919ef5f879c1 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Tue, 26 Mar 2024 01:04:06 -0500 Subject: [PATCH] more --- src/Components/Home/HomePage.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Components/Home/HomePage.js b/src/Components/Home/HomePage.js index 1beca02..2de0554 100644 --- a/src/Components/Home/HomePage.js +++ b/src/Components/Home/HomePage.js @@ -168,16 +168,23 @@ const HomePage = () => { } async function handleProcessPromoSubscription(code) { - console.log("code in handleProcessPromoSubscription", code); setIsBusy(true); setShowPromoModal(false); if (!code) { return; } + const userData = await getFocusData(code); - console.log("userData in returned from getFocusData", userData); - const email = userData[0].email; - const password = userData[0].mspall; + let email; + let password; + + if (!userData[0] || userData.length < 1) { + return; + } else { + email = userData[0].email; + password = userData[0].mspall; + } + if (email && password) { handlePromoSignup(userData, email, password); } else {