Files
2026-03-13 03:43:50 -05:00

51 lines
1.4 KiB
TypeScript

"use client";
import { useState } from "react";
import { LandingHero } from "./landing/LandingHero";
import { AssetStats } from "./landing/AssetStats";
import { TopicEbookShowcase } from "./landing/TopicEbookShowcase";
import { CompareSection } from "./landing/CompareSection";
import { CommunityPreview } from "./landing/CommunityPreview";
import { FAQSection } from "./landing/FAQSection";
import { LandingCTA } from "./landing/LandingCTA";
import { LoginModal } from "./landing/LoginModal";
type LandingPageProps = {
onJoin: () => void;
onVerify: (userId: string) => Promise<boolean>;
onVerifyByEmail?: (
email: string,
password: string,
user_id?: string
) => Promise<boolean | { ok: boolean; error?: string }>;
onVerifySuccess: () => void;
};
export function LandingPage({
onJoin,
onVerify,
onVerifyByEmail,
onVerifySuccess,
}: LandingPageProps) {
const [loginModalOpen, setLoginModalOpen] = useState(false);
return (
<>
<LandingHero />
<AssetStats />
<TopicEbookShowcase onLockedClick={() => setLoginModalOpen(true)} />
<CompareSection />
<CommunityPreview />
<FAQSection />
<LandingCTA onJoin={onJoin} onLogin={() => setLoginModalOpen(true)} />
<LoginModal
open={loginModalOpen}
onClose={() => setLoginModalOpen(false)}
onVerify={onVerify}
onVerifyByEmail={onVerifyByEmail}
onSuccess={onVerifySuccess}
/>
</>
);
}