From 838f2c7f5790c10779cfd32944c52f75713a4a05 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 25 Jan 2024 16:05:26 +0700
Subject: Add scroll to top component

---
 src/pages/_app.jsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/pages/_app.jsx')

diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx
index 9067fd03..e2190fda 100644
--- a/src/pages/_app.jsx
+++ b/src/pages/_app.jsx
@@ -35,6 +35,9 @@ const LogoSpinner = dynamic(
   () => import('@/core/components/elements/Spinner/LogoSpinner'),
   { ssr: false }
 );
+const ScrollToTop = dynamic(() => import('@/core/components/ScrollToTop'), {
+  ssr: false,
+});
 const Toaster = dynamic(
   () => import('react-hot-toast').then((mod) => mod.Toaster),
   { ssr: false }
@@ -80,6 +83,8 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }) {
 
   return (
     <SessionProvider session={session}>
+      <ScrollToTop />
+      
       <AnimatePresence>
         {animateLoader && (
           <motion.div
-- 
cgit v1.2.3

