From f30e847efe0371d235245bdd8a5ac8710266c25a Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Thu, 3 Feb 2022 21:46:59 -0600 Subject: [PATCH 1/5] :fire: remove unused cta prop --- components/WhyInvestHero.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/WhyInvestHero.jsx b/components/WhyInvestHero.jsx index 4626d5a..3a755ee 100644 --- a/components/WhyInvestHero.jsx +++ b/components/WhyInvestHero.jsx @@ -1,4 +1,4 @@ -export default function WhyInvestHero({ subTitle, title, description, cta }) { +export default function WhyInvestHero({ subTitle, title, description }) { return (
From b2a9e184125d97b2a4d095280dc5c888882d6cae Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Thu, 3 Feb 2022 21:53:55 -0600 Subject: [PATCH 2/5] :recycle: refactor SafeTerms to take session conditional --- components/Sections/SafeTerms.jsx | 15 ++++++++++++++- pages/index.jsx | 12 ++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/components/Sections/SafeTerms.jsx b/components/Sections/SafeTerms.jsx index d18cdbf..9d23782 100644 --- a/components/Sections/SafeTerms.jsx +++ b/components/Sections/SafeTerms.jsx @@ -1,5 +1,5 @@ import { useState } from "react"; - +import { signIn } from "next-auth/react"; import Modal from "../Modal"; import SafeNote from "../SafeNote"; @@ -9,9 +9,22 @@ export default function SafeTerms({ description, safeNoteContent, cta, + session, }) { const [isClicked, setIsClicked] = useState(true); const [safeType, setSafeType] = useState(null); + if (!session) { + return ( +
+ +
+ ); + } return (
- {!session ? ( - - ) : ( - - )} + + {!session ? null : ( <> From 4e03e8e51c247b074d87b63ae877dcd2ee8ad15d Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Thu, 3 Feb 2022 22:07:58 -0600 Subject: [PATCH 3/5] :recycle: update styling for conditional login button --- components/Sections/SafeTerms.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Sections/SafeTerms.jsx b/components/Sections/SafeTerms.jsx index 9d23782..eea1137 100644 --- a/components/Sections/SafeTerms.jsx +++ b/components/Sections/SafeTerms.jsx @@ -15,9 +15,9 @@ export default function SafeTerms({ const [safeType, setSafeType] = useState(null); if (!session) { return ( -
+
- + {!session ? null : ( + + )}
From b8fa431e51f865909cab09bebf1d67b61289c7d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Thu, 3 Feb 2022 22:09:13 -0600 Subject: [PATCH 5/5] :recycle: refactor to remove conditional and push into components --- pages/index.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/index.jsx b/pages/index.jsx index 4413060..e70792c 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -167,8 +167,7 @@ export default function Funded() { setMobileMenuIsClicked={setMobileMenuIsClicked} /> - - + {!session ? null : ( <>