Skip to content

Commit e5caf03

Browse files
authored
Merge pull request #137 from YAPP-Github/feature/PRODUCT-254
feat: Bottom Navigation 컴포넌트 생성 (#136)
2 parents d533c17 + 8243b2d commit e5caf03

File tree

19 files changed

+210
-46
lines changed

19 files changed

+210
-46
lines changed

src/app/(home)/layout.css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { semantic } from "@/styles";
44

55
export const mainContainer = style({
66
minHeight: "100dvh",
7-
paddingBottom: "2.4rem",
7+
paddingBottom: "5.6rem",
88
paddingInline: "2rem",
99
backgroundColor: semantic.background.white,
1010
});

src/app/(home)/layout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { BottomNavigation } from "@/components/ui/BottomNavigation";
2+
13
import { Header } from "./_components/Header";
24
import * as styles from "./layout.css";
35

@@ -10,6 +12,7 @@ export default function MainLayout({
1012
<>
1113
<Header />
1214
<main className={styles.mainContainer}>{children}</main>
15+
<BottomNavigation />
1316
</>
1417
);
1518
}

src/app/(store)/stores/(list)/layout.css.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ import { style } from "@vanilla-extract/css";
33
export const container = style({
44
paddingInline: "2rem",
55
minHeight: "100dvh",
6+
paddingBottom: "5.6rem",
67
});
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
import { BottomNavigation } from "@/components/ui/BottomNavigation";
2+
13
import * as styles from "./layout.css";
24

35
export default function StoreListLayout({
46
children,
57
}: {
68
children: React.ReactNode;
79
}) {
8-
return <div className={styles.container}>{children}</div>;
10+
return (
11+
<>
12+
<div className={styles.container}>{children}</div>
13+
<BottomNavigation />
14+
</>
15+
);
916
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { style } from "@vanilla-extract/css";
2+
3+
import { semantic } from "@/styles";
4+
5+
export const button = style({
6+
width: "2.4rem",
7+
height: "2.4rem",
8+
display: "flex",
9+
justifyContent: "center",
10+
alignItems: "center",
11+
});
12+
13+
export const icon = style({
14+
color: semantic.icon.black,
15+
});
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"use client";
2+
3+
import { useRouter } from "next/navigation";
4+
5+
import ChevronLeftIcon from "@/assets/chevron-left.svg";
6+
import { GNB } from "@/components/ui/GNB";
7+
8+
import * as styles from "./Header.css";
9+
10+
export const Header = () => {
11+
const router = useRouter();
12+
13+
const handleClick = () => {
14+
router.push("/");
15+
};
16+
17+
return (
18+
<GNB
19+
align='center'
20+
title='마이페이지'
21+
leftAddon={
22+
<button
23+
type='button'
24+
onClick={handleClick}
25+
aria-label='홈으로 이동하기'
26+
className={styles.button}
27+
>
28+
<ChevronLeftIcon
29+
width={24}
30+
height={24}
31+
onClick={handleClick}
32+
className={styles.icon}
33+
/>
34+
</button>
35+
}
36+
/>
37+
);
38+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Header } from "./Header";
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
import { style } from "@vanilla-extract/css";
22

3-
import { semantic } from "@/styles";
4-
53
export const wrapper = style({
64
height: "100dvh",
75
display: "flex",
86
flexDirection: "column",
97
});
108

11-
export const button = style({
12-
width: "2.4rem",
13-
height: "2.4rem",
14-
display: "flex",
15-
justifyContent: "center",
16-
alignItems: "center",
17-
});
18-
19-
export const icon = style({
20-
color: semantic.icon.black,
21-
});
22-
239
export const mainWrapper = style({
2410
display: "flex",
2511
flex: 1,
2612
flexDirection: "column",
27-
padding: "2rem",
13+
padding: "2rem 2rem 5.6rem",
2814
});

src/app/member/profile/layout.tsx

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"use client";
22

3-
import { useRouter } from "next/navigation";
43
import { type ReactNode } from "react";
54

6-
import ChevronLeftIcon from "@/assets/chevron-left.svg";
7-
import { GNB } from "@/components/ui/GNB";
5+
import { BottomNavigation } from "@/components/ui/BottomNavigation";
86

7+
import { Header } from "./_components/Header";
98
import * as styles from "./layout.css";
109

1110
type MemberProfileLayoutProps = {
@@ -15,33 +14,11 @@ type MemberProfileLayoutProps = {
1514
export default function MemberProfileLayout({
1615
children,
1716
}: MemberProfileLayoutProps) {
18-
const router = useRouter();
19-
const handleClick = () => {
20-
router.push("/");
21-
};
22-
2317
return (
2418
<div className={styles.wrapper}>
25-
<GNB
26-
align='center'
27-
title='마이페이지'
28-
leftAddon={
29-
<button
30-
type='button'
31-
onClick={handleClick}
32-
aria-label='홈으로 이동하기'
33-
className={styles.button}
34-
>
35-
<ChevronLeftIcon
36-
width={24}
37-
height={24}
38-
onClick={handleClick}
39-
className={styles.icon}
40-
/>
41-
</button>
42-
}
43-
/>
19+
<Header />
4420
<main className={styles.mainWrapper}>{children}</main>
21+
<BottomNavigation />
4522
</div>
4623
);
4724
}

src/assets/cheer.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)