Fixed useScroll hook warning.

This commit is contained in:
Andrés Mora 2025-12-19 06:49:05 -05:00
parent 9712e2065f
commit 2b96a395ba
2 changed files with 7 additions and 8 deletions

View File

@ -45,8 +45,8 @@ export default function RootLayout({
children: React.ReactNode; children: React.ReactNode;
}>) { }>) {
return ( return (
<html lang="en" className="scroll-smooth"> <html lang="en" className="scroll-smooth relative">
<body className={`${inter.variable} ${outfit.variable} antialiased`}> <body className={`${inter.variable} ${outfit.variable} antialiased relative`}>
{children} {children}
</body> </body>
</html> </html>

View File

@ -92,7 +92,7 @@ const territories = [
]; ];
export default function Home() { export default function Home() {
const heroRef = useRef(null); const heroRef = useRef<HTMLDivElement>(null);
const { scrollYProgress } = useScroll({ const { scrollYProgress } = useScroll({
target: heroRef, target: heroRef,
offset: ["start start", "end start"], offset: ["start start", "end start"],
@ -106,10 +106,8 @@ export default function Home() {
<Navigation /> <Navigation />
{/* Hero Section */} {/* Hero Section */}
<section <div ref={heroRef} className="relative">
ref={heroRef} <section className="relative min-h-screen flex items-center justify-center overflow-hidden bg-gradient-to-b from-neutral-50 to-white dark:from-neutral-950 dark:to-neutral-900">
className="relative min-h-screen flex items-center justify-center overflow-hidden bg-gradient-to-b from-neutral-50 to-white dark:from-neutral-950 dark:to-neutral-900"
>
{/* Animated background elements */} {/* Animated background elements */}
<div className="absolute inset-0 overflow-hidden"> <div className="absolute inset-0 overflow-hidden">
<motion.div <motion.div
@ -259,7 +257,8 @@ export default function Home() {
</motion.div> </motion.div>
</motion.div> </motion.div>
</motion.div> </motion.div>
</section> </section>
</div>
{/* Stats Section */} {/* Stats Section */}
<section className="relative py-20 bg-neutral-900 dark:bg-neutral-950 overflow-hidden"> <section className="relative py-20 bg-neutral-900 dark:bg-neutral-950 overflow-hidden">