From 963a6331c342dbbb00accd13df6c4340bac29152 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Wed, 4 Dec 2024 15:50:38 -0800 Subject: [PATCH] refactor: scroll-to-top --- src/app/layout.tsx | 2 ++ .../ScrollToTop.tsx => scroll-to-top.tsx} | 33 ++++++++++--------- src/components/search/Search.tsx | 2 -- 3 files changed, 20 insertions(+), 17 deletions(-) rename src/components/{search/ScrollToTop.tsx => scroll-to-top.tsx} (63%) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index ca8466b..447453d 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -6,6 +6,7 @@ import "./globals.css"; import { Footer } from "@/components/footer"; import GoogleAnalytics from "@/components/GoogleAnalytics"; import { Header } from "@/components/header"; +import { ScrollToTop } from "@/components/scroll-to-top"; import { Toaster } from "@/components/ui/toaster"; const inter = Inter({ subsets: ["latin"], fallback: ["sans-serif"] }); @@ -45,6 +46,7 @@ export default function RootLayout({
{children} +