feat: add scroll animation and fix TypeScript type error in useInView hook
This commit is contained in:
@@ -40,7 +40,7 @@ function Chart({
|
||||
let id = useId()
|
||||
let svgRef = useRef<React.ElementRef<'svg'>>(null)
|
||||
let pathRef = useRef<React.ElementRef<'path'>>(null)
|
||||
let isInView = useInView(svgRef, { amount: 0.5, once: true })
|
||||
let isInView = useInView(svgRef as React.RefObject<Element>, { amount: 0.5, once: true })
|
||||
let pathWidth = useMotionValue(0)
|
||||
let [interactionEnabled, setInteractionEnabled] = useState(false)
|
||||
|
||||
|
@@ -37,7 +37,7 @@ export function HomeAbout() {
|
||||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
|
||||
|
||||
return (
|
||||
<div className="relative h-screen">
|
||||
<div id="about" className="relative h-screen">
|
||||
<div className="relative isolate px-6 lg:px-8">
|
||||
<div className="relative -top-10 mx-auto max-w-8xl h-screen flex items-center justify-center">
|
||||
<motion.div
|
||||
|
@@ -51,10 +51,10 @@ export function HomeHero() {
|
||||
>
|
||||
Building the infrastructure where AI agents can live, communicate, and evolve with complete sovereignty.
|
||||
</motion.p>
|
||||
<div className="absolute bottom-24 right-0 flex items-center gap-x-2 text-2xl font-medium text-[#2F3178] lg:text-2xl">
|
||||
<a href="#about" className="absolute bottom-24 right-0 flex items-center gap-x-2 text-2xl font-medium text-[#2F3178] lg:text-3xl animate-bounce-y">
|
||||
<span>scroll</span>
|
||||
<ChevronDoubleDownIcon className="h-6 w-6" />
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user