From 8dea9e9242aca8bf003a7c2f69c96abafbf77e6d Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Mon, 10 Apr 2023 16:29:48 +0700
Subject: page loader

---
 src/core/components/elements/Link/Link.jsx | 8 --------
 1 file changed, 8 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 360444a6..b2dbd02f 100644
--- a/src/core/components/elements/Link/Link.jsx
+++ b/src/core/components/elements/Link/Link.jsx
@@ -1,14 +1,6 @@
 import NextLink from 'next/link'
-import { useRouter } from 'next/router'
-import { useEffect } from 'react'
 
 const Link = ({ children, ...props }) => {
-  const router = useRouter()
-
-  useEffect(() => {
-    router.events.on('routeChangeComplete', () => window.scrollTo({ top: 0, behavior: 'smooth' }))
-  }, [router])
-
   return (
     <NextLink
       {...props}
-- 
cgit v1.2.3


From 92c2a229d9c9b510d71b928978872a8b107e9d5a Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 11 Apr 2023 09:47:25 +0700
Subject: Documentation and refactor code

---
 src/core/components/elements/Link/Link.jsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(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 b2dbd02f..f6b39d45 100644
--- a/src/core/components/elements/Link/Link.jsx
+++ b/src/core/components/elements/Link/Link.jsx
@@ -1,5 +1,13 @@
 import NextLink from 'next/link'
 
+/**
+ * The `Link` component is used to render Next.js links with customizable properties such as `children`, `scroll`, and `className`.
+ *
+ * @param {Object} props - Props passed to the `Link` component.
+ * @param {ReactNode} props.children - Child elements to be rendered as link content.
+ * @param {string} props.className - Additional CSS class to be applied to the link.
+ * @returns {JSX.Element} - Rendered `Link` component.
+ */
 const Link = ({ children, ...props }) => {
   return (
     <NextLink
-- 
cgit v1.2.3

