File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
shared/components/scrollTop Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11import type { Metadata } from 'next' ;
22import '@/shared/styles/global.css' ;
33import { Toaster } from 'react-hot-toast' ;
4- import ScrollTopBtn from '@/shared/components/scrollTop/ScrollTopBtn' ;
54import Header from '@/shared/components/header/Header' ;
65import FooterWrapper from '@/shared/components/footer/FooterWrapper' ;
6+ import ScrollTopBtnWrapper from '@/shared/components/scrollTop/ScrollTopBtnWrapper' ;
77export const metadata : Metadata = {
88 title : 'SSOUL' ,
99 description : '칵테일을 좋아하는 사람들을 위한 서비스' ,
@@ -36,7 +36,7 @@ export default function RootLayout({
3636 } }
3737 />
3838
39- < ScrollTopBtn />
39+ < ScrollTopBtnWrapper />
4040 </ body >
4141 </ html >
4242 ) ;
Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
3+ import { usePathname } from 'next/navigation' ;
4+ import ScrollTopBtn from './ScrollTopBtn' ;
5+
6+ function ScrollTopBtnWrapper ( ) {
7+ const pathname = usePathname ( ) ;
8+ const showScroll = pathname !== '/recommend' ;
9+
10+ return showScroll ? < ScrollTopBtn /> : null ;
11+ }
12+ export default ScrollTopBtnWrapper ;
You can’t perform that action at this time.
0 commit comments