File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"use client" ;
22
3- import { useEffect , useState } from "react" ;
43import Image from "next/image" ;
54import { ArrowUpRight } from "lucide-react" ;
65import { motion , useReducedMotion } from "motion/react" ;
@@ -18,7 +17,7 @@ type Outpost = {
1817/**
1918 * 首页"社区网络"版块:三个生态前哨(monitor / mc / openInvest)做成全宽波段,
2019 * 滚动进入视口时错峰升起,hover 时墨色从左漫过整条(反色 wipe)。
21- * SSR/无 JS/ reduced-motion 时直接渲染可见状态(mounted 门控),不把内容藏死 。
20+ * reduced-motion 时跳过入场动画,直接渲染最终可见状态 。
2221 */
2322export function CommunityNetwork ( {
2423 label,
@@ -28,9 +27,7 @@ export function CommunityNetwork({
2827 outposts : Outpost [ ] ;
2928} ) {
3029 const reduce = useReducedMotion ( ) ;
31- const [ mounted , setMounted ] = useState ( false ) ;
32- useEffect ( ( ) => setMounted ( true ) , [ ] ) ;
33- const animate = mounted && ! reduce ;
30+ const animate = ! reduce ;
3431
3532 return (
3633 < div className = "mt-16 border-t-4 border-[var(--foreground)] transition-colors duration-300" >
You can’t perform that action at this time.
0 commit comments