Skip to content

Commit e384774

Browse files
committed
design: layout 수정
1 parent 23c5865 commit e384774

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

src/layouts/Layout.tsx

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,36 @@ function Layout() {
2020
location.pathname === '/chat';
2121

2222
return (
23-
<div className="flex justify-center w-full min-h-screen">
24-
<div className="max-w-[600px] min-w-[320px] w-full bg-background flex flex-col">
25-
{/* 헤더 */}
26-
<HeaderWrapper />
23+
<div className="max-w-[600px] min-w-[320px] w-full bg-background flex min-h-screen mx-auto">
24+
{/* 헤더 */}
25+
<HeaderWrapper />
2726

28-
{/* 메인 컨텐츠 영역 */}
29-
<div
30-
className={twMerge(
31-
'pt-[44px] flex-1 flex justify-center w-full px-3',
32-
showNav && 'pb-[62px] ', // 하단 네비게이션 숨길때만 padding주기
33-
)}
34-
>
35-
<MyErrorBoundary>
36-
<AnimatePresence mode="wait">
37-
<motion.div
38-
key={location.pathname} // 경로가 바뀔 때마다 애니메이션 트리거
39-
initial={{ opacity: 0 }}
40-
animate={{ opacity: 1 }}
41-
transition={{ duration: 0.3 }}
42-
className="flex justify-center w-full h-full"
43-
>
44-
<Outlet />
45-
</motion.div>
46-
</AnimatePresence>
47-
</MyErrorBoundary>
48-
</div>
49-
50-
{/* 하단 네비게이션 */}
51-
<BottomNavWrapper />
52-
{/* 글작성 버튼 */}
53-
<PostButton />
27+
{/* 메인 컨텐츠 영역 */}
28+
<div
29+
className={twMerge(
30+
'pt-[44px] flex-1 flex justify-center w-full px-3',
31+
showNav && 'pb-[62px] ', // 하단 네비게이션 숨길때만 padding주기
32+
)}
33+
>
34+
<MyErrorBoundary>
35+
<AnimatePresence mode="wait">
36+
<motion.div
37+
key={location.pathname} // 경로가 바뀔 때마다 애니메이션 트리거
38+
initial={{ opacity: 0 }}
39+
animate={{ opacity: 1 }}
40+
transition={{ duration: 0.3 }}
41+
className="flex justify-center w-full h-full"
42+
>
43+
<Outlet />
44+
</motion.div>
45+
</AnimatePresence>
46+
</MyErrorBoundary>
5447
</div>
48+
49+
{/* 하단 네비게이션 */}
50+
<BottomNavWrapper />
51+
{/* 글작성 버튼 */}
52+
<PostButton />
5553
</div>
5654
);
5755
}

0 commit comments

Comments
 (0)