Skip to content

Commit a89fafe

Browse files
committed
refactor: 홈 navbar 수정
1 parent ebadbd2 commit a89fafe

File tree

6 files changed

+49
-61
lines changed

6 files changed

+49
-61
lines changed

src/assets/svg/ic-logo.svg

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/assets/svg/ic-share.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/Navbar/Navbar.stories.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ export const HomeNavbar: Story = {
2727
name: "HomeNavbar",
2828
render: () => (
2929
<Navbar>
30-
<Navbar.LeftButton>
31-
<Icon name="logo" />
32-
</Navbar.LeftButton>
3330
<Navbar.RightButton>
3431
<Text variant="bodySm" color="secondary">
3532
앱 공유하기

src/components/ui/Icon/Icon.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import CloseIcon from "@/assets/svg/ic-close.svg?react";
44
import EmptyCircleIcon from "@/assets/svg/ic-empty-circle.svg?react";
55
import GalleryIcon from "@/assets/svg/ic-gallery.svg?react";
66
import LeftArrowIcon from "@/assets/svg/ic-left-arrow.svg?react";
7-
import LogoIcon from "@/assets/svg/ic-logo.svg?react";
87
import PasteIcon from "@/assets/svg/ic-paste.svg?react";
98
import PlusIcon from "@/assets/svg/ic-plus.svg?react";
9+
import ShareIcon from "@/assets/svg/ic-share.svg?react";
1010

1111
export type IconNameType =
1212
| "camera"
@@ -17,7 +17,7 @@ export type IconNameType =
1717
| "plus"
1818
| "checkCircle"
1919
| "emptyCircle"
20-
| "logo";
20+
| "share";
2121

2222
export interface IconProps {
2323
name: IconNameType;
@@ -32,7 +32,7 @@ export const ICONS = {
3232
plus: PlusIcon,
3333
checkCircle: CheckCircleIcon,
3434
emptyCircle: EmptyCircleIcon,
35-
logo: LogoIcon,
35+
share: ShareIcon,
3636
};
3737

3838
// 추후 사이즈, 컬러등 추가 가능

src/pages/HomePage/HomePage.module.scss

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
@use "@/styles/_mixins.scss" as *;
22

3+
.FeedbackButton {
4+
padding: 0.5rem 0.75rem;
5+
background-color: var(--color-gray200);
6+
border-radius: 0.75rem;
7+
height: 2.25rem;
8+
white-space: nowrap;
9+
color: var(--color-text-primary);
10+
line-height: 1.5rem;
11+
align-items: center;
12+
@include bodyM;
13+
}
14+
15+
.ShareButton {
16+
width: 2.25rem;
17+
height: 2.25rem;
18+
background-color: var(--color-gray200);
19+
border-radius: 0.75rem;
20+
align-items: center;
21+
justify-content: center;
22+
margin-left: 0.625rem;
23+
}
24+
325
.Home {
426
padding-left: 1.25rem;
527
padding-right: 1.25rem;
@@ -59,7 +81,7 @@
5981
display: flex;
6082
justify-content: center;
6183
align-items: center;
62-
margin-top: 3.75rem;
84+
z-index: 1;
6385

6486
& > img {
6587
width: 14.375rem;

src/pages/HomePage/HomePage.tsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ import { useEffect } from "react";
33
import Navbar from "@/components/Navbar/Navbar";
44
import { AppBridgeMessageType } from "@/components/provider/AppBridgeProvider/AppBridgeMessage.types";
55
import { useAppBridge } from "@/components/provider/AppBridgeProvider/AppBridgeProvider";
6+
import Icon from "@/components/ui/Icon/Icon";
67
import IconButton from "@/components/ui/IconButton/IconButton";
78
import Text from "@/components/ui/Text/Text";
89

10+
import { useChannelTalk } from "@/hooks/common/useChannelTalk";
911
import { useRoute } from "@/hooks/common/useRoute";
1012

1113
import styles from "@/pages/HomePage/HomePage.module.scss";
@@ -18,6 +20,8 @@ const SHARE_TEXT =
1820
"영수증을 촬영하면 AI가 자동으로 맛집 리뷰를 생성! 🍽️✨ 간편하게 추억을 남기고, 나만의 미식 기록을 완성하세요. 미식 경험을 더욱 스마트하게, 미식 MISIK!";
1921

2022
const HomePage = () => {
23+
const { openChannelTalk } = useChannelTalk();
24+
2125
const { send } = useAppBridge();
2226

2327
const { scanData } = useScanDataStore();
@@ -37,16 +41,20 @@ const HomePage = () => {
3741
return (
3842
<>
3943
<Navbar>
40-
<Navbar.RightButton
41-
onClick={() => {
42-
gTagLogEvent("share_button");
43-
44-
send({ type: AppBridgeMessageType.SHARE, payload: { shareText: SHARE_TEXT } });
45-
}}
46-
>
47-
<Text variant="bodySm" color="secondary">
48-
앱 공유하기
49-
</Text>
44+
<Navbar.RightButton>
45+
<button className={styles.FeedbackButton} onClick={openChannelTalk}>
46+
의견 남기기
47+
</button>
48+
<button
49+
className={styles.ShareButton}
50+
onClick={() => {
51+
gTagLogEvent("share_button");
52+
53+
send({ type: AppBridgeMessageType.SHARE, payload: { shareText: SHARE_TEXT } });
54+
}}
55+
>
56+
<Icon name="share" />
57+
</button>
5058
</Navbar.RightButton>
5159
</Navbar>
5260

@@ -58,9 +66,10 @@ const HomePage = () => {
5866
손쉬운 음식 리뷰 작성
5967
</Text>
6068
</div>
61-
<div className={styles.HomeImage}>
62-
<img src="/assets/img/img-graphic-logo.webp" alt="mainLogo" />
63-
</div>
69+
</div>
70+
71+
<div className={styles.HomeImage}>
72+
<img src="/assets/img/img-graphic-logo.webp" alt="mainLogo" />
6473
</div>
6574

6675
<div className={styles.HomeBottom}>

0 commit comments

Comments
 (0)