From bd65a11a9f6ed0589ccdf86745abbf12b17816e9 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 4 Apr 2023 17:00:51 +0700
Subject: forgot password

---
 src/core/components/elements/Link/Link.jsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/core/components/elements/Link/Link.jsx')

diff --git a/src/core/components/elements/Link/Link.jsx b/src/core/components/elements/Link/Link.jsx
index 557abbc4..05859639 100644
--- a/src/core/components/elements/Link/Link.jsx
+++ b/src/core/components/elements/Link/Link.jsx
@@ -6,13 +6,12 @@ const Link = ({ children, ...props }) => {
   const router = useRouter()
 
   useEffect(() => {
-    router.events.on('routeChangeStart', () => window.scrollTo({ top: 0, behavior: 'smooth' }))
+    router.events.on('routeChangeComplete', () => window.scrollTo({ top: 0, behavior: 'smooth' }))
   }, [router])
 
   return (
     <NextLink
       {...props}
-      // onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}
       scroll={false}
       className={`block font-medium text-red_r-11 ${props?.className || ''}`}
     >
-- 
cgit v1.2.3

