File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export const useHandleError = () => {
88 const handleError = ( error : Error , customMessage ?: string ) => {
99 if ( isAxiosError < ErrorResponse > ( error ) ) {
1010 openToast ( {
11- message : error . response ?. data . message || customMessage || '์ ์ ์๋ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค' ,
11+ message : customMessage || error . response ?. data . message || '์ ์ ์๋ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค' ,
1212 } ) ;
1313 }
1414 } ;
Original file line number Diff line number Diff line change 1+ import { useHandleError } from '@/common/hooks/useHandleError' ;
12import client from '@/common/utils/client' ;
23import { QUERY_KEYS } from '@/libs/queryKeys' ;
34import { useMutation , useQueryClient } from '@tanstack/react-query' ;
@@ -9,12 +10,16 @@ const postLike = async (itemId: number) => {
910
1011export const usePostLike = ( ) => {
1112 const queryClient = useQueryClient ( ) ;
13+ const handleError = useHandleError ( ) ;
1214
1315 return useMutation ( {
1416 mutationFn : postLike ,
1517 onSuccess : ( ) => {
1618 queryClient . invalidateQueries ( { queryKey : [ QUERY_KEYS . ITEM_DETAIL ] } ) ;
1719 queryClient . invalidateQueries ( { queryKey : [ QUERY_KEYS . ITEM_LIST ] } ) ;
1820 } ,
21+ onError : error => {
22+ handleError ( error , '๋ก๊ทธ์ธ ํ ์๋ํด ์ฃผ์ธ์.' ) ;
23+ } ,
1924 } ) ;
2025} ;
Original file line number Diff line number Diff line change @@ -3,17 +3,31 @@ import * as s from './style.css';
33import { Link } from 'react-router' ;
44import { usePostLogout } from '../../apis/usePostLogout' ;
55import { useToast } from '@/common/hooks/useToast' ;
6+ import { REPICKA_INSTAGRAM } from '@/libs/constants' ;
67
78interface MenuProps {
89 Title : string ;
910 Icon : string ;
1011 Addr : string ;
12+ Link ?: string ;
1113}
1214
1315const 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 >
Original file line number Diff line number Diff line change 1- export const VERSION_NAME = 'v1.0.1' ;
1+ 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
35export const MAX_PRICE = 999999 ;
46export const MAX_LOCATION = 100 ;
You canโt perform that action at this time.
0 commit comments