fix: implement scroll-to-top behavior for about navigation

This commit is contained in:
ramvignesh-b
2026-05-04 06:45:56 +05:30
parent fce0b5b539
commit 84445f16b3
2 changed files with 11 additions and 2 deletions
+4 -1
View File
@@ -19,7 +19,7 @@ import {
} from "@phosphor-icons/react";
import { ReactLenis } from "lenis/react";
import { AnimatePresence, motion, useScroll, useTransform } from "motion/react";
import { useRef, useState } from "react";
import { useEffect, useRef, useState } from "react";
import stamp from "../assets/envelope/stamp.png";
import Logo from "../components/Logo.tsx";
import { Modal } from "../components/ui/Modal";
@@ -47,6 +47,9 @@ function HorizontalScroll({ children }: { children: React.ReactNode }) {
}
export default function About() {
useEffect(() => {
window.scrollTo(0, 0);
}, []);
return (
<ReactLenis root options={{ lerp: 0.1, duration: 1.5, smoothWheel: true }}>
<div className="flex flex-col">