forked from emre/www_projectmycelium_com
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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user