This commit is contained in:
eric
2026-03-31 12:44:54 -05:00
parent 2ffbddff2e
commit 4497604242
10 changed files with 359 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
"use client";
import { useState } from "react";
import { useRef, useState } from "react";
import { LandingHero } from "./landing/LandingHero";
import { AssetStats } from "./landing/AssetStats";
import { TopicEbookShowcase } from "./landing/TopicEbookShowcase";
@@ -31,6 +31,22 @@ export function LandingPage({
}: LandingPageProps) {
const [loginModalOpen, setLoginModalOpen] = useState(false);
const [promoModalOpen, setPromoModalOpen] = useState(false);
const [payTestMode, setPayTestMode] = useState(() => {
if (typeof window === "undefined") return false;
return localStorage.getItem("vipPayTestMode") === "1";
});
const titleTapCountRef = useRef(0);
const handleHeroTitleTap = () => {
titleTapCountRef.current += 1;
if (titleTapCountRef.current < 10) return;
titleTapCountRef.current = 0;
const nextMode = !payTestMode;
setPayTestMode(nextMode);
if (typeof window !== "undefined") {
localStorage.setItem("vipPayTestMode", nextMode ? "1" : "0");
}
};
return (
<>
@@ -43,7 +59,7 @@ export function LandingPage({
<div className={styles.landingNoise} />
</div>
<div className={styles.landingSceneInner}>
<LandingHero />
<LandingHero onTitleTap={handleHeroTitleTap} />
<AssetStats />
<TopicEbookShowcase onLockedClick={() => setLoginModalOpen(true)} />
<CompareSection />
@@ -54,6 +70,7 @@ export function LandingPage({
<LandingCTA
onJoin={onJoin}
onLogin={() => setLoginModalOpen(true)}
payTestMode={payTestMode}
/>
</div>
</div>