Skip to content

Commit 6117c3d

Browse files
committed
fix(website): keep chronos demo free interaction after card selection
1 parent b6ad23c commit 6117c3d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎website/app/features/dive/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ export const metadata: Metadata = {
1313

1414
export default function Page() {
1515
return <DivePage />;
16-
}
16+
}

‎website/components/dive/DivePage.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ function DiveOutcomeMockup() {
5959
}
6060

6161
export function DivePage() {
62-
// null = 自由交互;六态卡片点击时受控切换
62+
// demoState 仅由六态卡片显式选择驱动(受控入口);
63+
// 自由点击(点它两下,感受它苏醒)由 ChronosDemo 内部状态机管理,
64+
// 不回调写入 demoState,否则首次点击后组件进入受控模式、后续点击被拦截。
6365
const [demoState, setDemoState] = useState<ChronosState | null>(null);
6466

6567
return (
@@ -71,7 +73,7 @@ export function DivePage() {
7173
ctaText={DIVE_CONFIG.cta.text}
7274
demo={
7375
<div>
74-
<ChronosDemo controlledState={demoState} onStateChange={setDemoState} />
76+
<ChronosDemo controlledState={demoState} />
7577
<p className="text-xs text-kb-text3 mt-4">点它两下,感受它苏醒</p>
7678
</div>
7779
}
@@ -129,4 +131,4 @@ export function DivePage() {
129131
</section>
130132
</div>
131133
);
132-
}
134+
}

0 commit comments

Comments
 (0)