diff options
Diffstat (limited to 'src/core/components/elements')
| -rw-r--r-- | src/core/components/elements/Link/Link.jsx | 10 | ||||
| -rw-r--r-- | src/core/components/elements/Popup/BottomPopup.jsx | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/core/components/elements/Link/Link.jsx b/src/core/components/elements/Link/Link.jsx index 75fc6ca8..557abbc4 100644 --- a/src/core/components/elements/Link/Link.jsx +++ b/src/core/components/elements/Link/Link.jsx @@ -1,10 +1,18 @@ 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('routeChangeStart', () => window.scrollTo({ top: 0, behavior: 'smooth' })) + }, [router]) + return ( <NextLink {...props} - onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })} + // onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })} scroll={false} className={`block font-medium text-red_r-11 ${props?.className || ''}`} > diff --git a/src/core/components/elements/Popup/BottomPopup.jsx b/src/core/components/elements/Popup/BottomPopup.jsx index 1fc77932..5e9f68c7 100644 --- a/src/core/components/elements/Popup/BottomPopup.jsx +++ b/src/core/components/elements/Popup/BottomPopup.jsx @@ -49,9 +49,9 @@ const BottomPopup = ({ children, active = false, title, close }) => { <DesktopView> <motion.div - initial={{ bottom: '40%', opacity: 0 }} - animate={{ bottom: '35%', opacity: 1 }} - exit={{ bottom: '30%', opacity: 0 }} + initial={{ bottom: '55%', opacity: 0 }} + animate={{ bottom: '50%', opacity: 1 }} + exit={{ bottom: '45%', opacity: 0 }} transition={transition} className='fixed left-1/2 -translate-x-1/2 w-2/5 border border-gray_r-6 rounded-xl z-[60] p-4 pt-0 bg-white' > |
