Skip to content

Commit b797ff4

Browse files
committed
feat: 문의하기 버튼 추가
1 parent 140f1c9 commit b797ff4

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

src/features/my/components/MyTrade/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,31 @@ import * as s from './style.css';
33
import { Link } from 'react-router';
44
import { usePostLogout } from '../../apis/usePostLogout';
55
import { useToast } from '@/common/hooks/useToast';
6+
import { REPICKA_INSTAGRAM } from '@/libs/constants';
67

78
interface MenuProps {
89
Title: string;
910
Icon: string;
1011
Addr: string;
12+
Link?: string;
1113
}
1214

1315
const Menu = ({ Title, Icon, Addr }: MenuProps) => {
1416
const { mutate: postLogout } = usePostLogout();
1517
const { openToast } = useToast();
1618

19+
if (Title === '문의하기') {
20+
return (
21+
<a href={REPICKA_INSTAGRAM} target="_blank" rel="noopener noreferrer" className={s.GoMenu}>
22+
<div className={s.MenuContent}>
23+
<span className={cx(`${Icon}`)} />
24+
{Title}
25+
</div>
26+
<div className={cx('mgc_right_line', s.Icon)} />
27+
</a>
28+
);
29+
}
30+
1731
if (Title !== '로그아웃') {
1832
return (
1933
<Link className={s.GoMenu} to={Addr}>
@@ -53,6 +67,7 @@ const MyTrade = () => {
5367
<div className={s.Menu}>
5468
<Menu Icon="mgc_heart_fill" Title="관심 목록" Addr="/liked" />
5569
<Menu Icon="mgc_shopping_bag_1_fill" Title="나의 판매 내역" Addr="/my-trade" />
70+
<Menu Icon="mgc_instagram_line" Title="문의하기" Addr="/my-trade" />
5671
<Menu Icon="mgc_exit_fill" Title="로그아웃" Addr="/my-trade" />
5772
</div>
5873
</div>

src/libs/constants/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
export const VERSION_NAME = 'v1.0.2';
2+
export const REPICKA_INSTAGRAM =
3+
'https://www.instagram.com/repicka.shop?utm_source=ig_web_button_share_sheet&igsh=ZDNlZDc0MzIxNw==';
24

35
export const MAX_PRICE = 999999;
46
export const MAX_LOCATION = 100;

0 commit comments

Comments
 (0)