From 5f5329361a19894e2331de4b8663919ef5f879c1 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Tue, 26 Mar 2024 01:04:06 -0500 Subject: [PATCH 1/2] 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 { From f1ec3d0801e45d710f412d6a2fe5cefd8af3b7fc Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Tue, 26 Mar 2024 01:05:16 -0500 Subject: [PATCH 2/2] more --- src/Components/Home/HomePage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Home/HomePage.js b/src/Components/Home/HomePage.js index 2de0554..3864eac 100644 --- a/src/Components/Home/HomePage.js +++ b/src/Components/Home/HomePage.js @@ -178,7 +178,7 @@ const HomePage = () => { let email; let password; - if (!userData[0] || userData.length < 1) { + if (userData === undefined) { return; } else { email = userData[0].email;