diff --git a/components/Button/TopButton.tsx b/components/Button/TopButton.tsx index 5d0e046..547146b 100644 --- a/components/Button/TopButton.tsx +++ b/components/Button/TopButton.tsx @@ -1,8 +1,11 @@ import Image from 'next/image'; import React, { useState, useEffect } from 'react'; +import { useRouter } from 'next/router'; const TopButton = () => { const [showButton, setShowButton] = useState(false); + const router = useRouter(); + const isActivityDetailPage = router.pathname.startsWith('/activity-details/'); const scrollToTop = () => { window.scroll({ @@ -26,7 +29,13 @@ const TopButton = () => { return ( <> {showButton && ( -
+