@@ -4,6 +4,7 @@ import { Link } from 'react-router';
44import { usePostLogout } from '../../apis/usePostLogout' ;
55import { useToast } from '@/common/hooks/useToast' ;
66import { REPICKA_INSTAGRAM } from '@/libs/constants' ;
7+ import DeleteAccountButton from '@/features/my/components/MyTrade/DeleteAccountButton' ;
78
89interface MenuProps {
910 Title : string ;
@@ -28,35 +29,35 @@ const Menu = ({ Title, Icon, Addr }: MenuProps) => {
2829 ) ;
2930 }
3031
31- if ( Title ! == '로그아웃' ) {
32+ if ( Title = == '로그아웃' ) {
3233 return (
33- < Link className = { s . GoMenu } to = { Addr } >
34+ < button
35+ className = { s . GoMenu }
36+ onClick = { ( ) => {
37+ postLogout ( undefined , {
38+ onSuccess : ( ) => {
39+ openToast ( { message : '로그아웃 완료!' } ) ;
40+ } ,
41+ } ) ;
42+ } }
43+ >
3444 < div className = { s . MenuContent } >
3545 < span className = { cx ( `${ Icon } ` ) } />
3646 { Title }
3747 </ div >
3848 < div className = { cx ( 'mgc_right_line' , s . Icon ) } />
39- </ Link >
49+ </ button >
4050 ) ;
4151 }
4252
4353 return (
44- < button
45- className = { s . GoMenu }
46- onClick = { ( ) => {
47- postLogout ( undefined , {
48- onSuccess : ( ) => {
49- openToast ( { message : '로그아웃 완료!' } ) ;
50- } ,
51- } ) ;
52- } }
53- >
54+ < Link className = { s . GoMenu } to = { Addr } >
5455 < div className = { s . MenuContent } >
5556 < span className = { cx ( `${ Icon } ` ) } />
5657 { Title }
5758 </ div >
5859 < div className = { cx ( 'mgc_right_line' , s . Icon ) } />
59- </ button >
60+ </ Link >
6061 ) ;
6162} ;
6263
@@ -69,6 +70,7 @@ const MyTrade = () => {
6970 < Menu Icon = "mgc_shopping_bag_1_fill" Title = "나의 판매 내역" Addr = "/my-trade" />
7071 < Menu Icon = "mgc_instagram_line" Title = "문의하기" Addr = "/my-trade" />
7172 < Menu Icon = "mgc_exit_fill" Title = "로그아웃" Addr = "/my-trade" />
73+ < DeleteAccountButton />
7274 </ div >
7375 </ div >
7476 ) ;
0 commit comments