Skip to content

Commit a0d9f89

Browse files
committed
[feat] scrollTopbtn 취향추천 페이지에서 none 처리
1 parent 309306a commit a0d9f89

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Metadata } from 'next';
22
import '@/shared/styles/global.css';
33
import { Toaster } from 'react-hot-toast';
4-
import ScrollTopBtn from '@/shared/components/scrollTop/ScrollTopBtn';
54
import Header from '@/shared/components/header/Header';
65
import FooterWrapper from '@/shared/components/footer/FooterWrapper';
6+
import ScrollTopBtnWrapper from '@/shared/components/scrollTop/ScrollTopBtnWrapper';
77
export 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
);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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;

0 commit comments

Comments
 (0)