From 8da3ff45c587a3ed140cba8c8329aa410cfa761b Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 5 Aug 2025 23:33:00 +0000 Subject: [PATCH] Add scroll-to-top feature for footer menu items cgen-3605cd19ecd344cea08fbc4186d92d7a --- client/components/Layout.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/components/Layout.tsx b/client/components/Layout.tsx index bf9cf5f3..c54f880e 100644 --- a/client/components/Layout.tsx +++ b/client/components/Layout.tsx @@ -16,6 +16,10 @@ export default function Layout({ children }: LayoutProps) { { name: "Contact", href: "/contact" }, ]; + const scrollToTop = () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }; + return (