Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion components/Sections/SafeTerms.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "react";

import { signIn } from "next-auth/react";
import Modal from "../Modal";
import SafeNote from "../SafeNote";

Expand All @@ -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 (
<div className="mx-4 md:w-2/5 md:mx-auto md:pb-12 lg:w-1/2 lg:mx-auto lg:pb-24">
<button
className="w-full md:px-12 block px-5 py-3 text-sm font-semibold text-indigo-500 hover:text-white hover:bg-indigo-500 border border-indigo-500 hover:border-indigo-600 rounded transition duration-200"
onClick={() => signIn()}
>
Log in to see terms
</button>
</div>
);
}
return (
<section
id="safe-terms"
Expand Down
19 changes: 11 additions & 8 deletions components/Sections/WhyInvest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default function WhyInvest({
description,
cta,
whyInvestCardData,
session,
}) {
return (
<section id="why-invest" className="py-20">
Expand All @@ -31,14 +32,16 @@ export default function WhyInvest({
})}
</div>
</div>
<div className="text-center mx-auto">
<a
className="inline-block px-5 py-3 md:mr-3 mb-3 md:mb-0 text-sm bg-indigo-500 hover:bg-indigo-600 text-white font-semibold border border-indigo-500 hover:border-indigo-600 rounded transition duration-200"
href="#safe-terms"
>
{cta}
</a>
</div>
{!session ? null : (
<div className="mt-12 text-center mx-auto">
<a
className="inline-block px-12 py-3 mb-3 md:mb-0 text-sm bg-indigo-500 hover:bg-indigo-600 text-white font-semibold border border-indigo-500 hover:border-indigo-600 rounded transition duration-200"
href="#safe-terms"
>
{cta}
</a>
</div>
)}
</div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion components/WhyInvestHero.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function WhyInvestHero({ subTitle, title, description, cta }) {
export default function WhyInvestHero({ subTitle, title, description }) {
return (
<div className="w-full lg:w-1/2 px-4 text-center lg:text-left">
<div className="lg:mx-auto mb-10 lg:mb-0">
Expand Down
13 changes: 2 additions & 11 deletions pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,8 @@ export default function Funded() {
setMobileMenuIsClicked={setMobileMenuIsClicked}
/>
<Stats data={stats1Data} />
<WhyInvest {...whyInvestContent} />
{!session ? (
<button
className="block md:inline-block px-5 py-3 text-sm font-semibold text-indigo-500 hover:text-white hover:bg-indigo-500 border border-indigo-500 hover:border-indigo-600 rounded transition duration-200"
onClick={() => signIn()}
>
Log in to see terms
</button>
) : (
<SafeTerms {...safeTermsContent} />
)}
<WhyInvest {...whyInvestContent} session={session} />
<SafeTerms {...safeTermsContent} session={session} />
{!session ? null : (
<>
<FactCards factCardsContent={factCardsContent} />
Expand Down