's'
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user