feat: enhance homepage with smooth scroll navigation

- Added scroll-to-slider functionality when clicking "Get Started" button
- Modified AnimatedSection to support ref forwarding for scroll targeting
- Updated HomeAurora component to accept click handler prop
- Refined homepage hero text and description for clearer value proposition
- Changed button from link to click handler for better user interaction
This commit is contained in:
2025-11-01 21:08:42 +01:00
parent 51ef8dffb5
commit 3564b5cb0f
3 changed files with 22 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
import { useRef } from 'react'
import { AnimatedSection } from '../../components/AnimatedSection'
import { HomeAurora } from './HomeAurora'
import { StackSectionLight } from './StackSection'
@@ -8,10 +9,15 @@ import { HomeSlider } from './HomeSlider'
export default function HomePage() {
const sliderRef = useRef<HTMLDivElement>(null)
const handleScrollToSlider = () => {
sliderRef.current?.scrollIntoView({ behavior: 'smooth' })
}
return (
<div>
<AnimatedSection>
<HomeAurora />
<HomeAurora onGetStartedClick={handleScrollToSlider} />
</AnimatedSection>
<AnimatedSection id="next-section">
@@ -23,7 +29,7 @@ export default function HomePage() {
</AnimatedSection>
<AnimatedSection>
<AnimatedSection ref={sliderRef}>
<HomeSlider />
</AnimatedSection>