File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ const LogoutPage = () => {
2222 'code' in error &&
2323 (
2424 ( error as { code ?: string } ) . code === 'TOKEN4001' ||
25- ( error as { code ?: string } ) . code === 'TOKEN4004' )
25+ ( error as { code ?: string } ) . code === 'TOKEN4004'
26+ )
2627 ) {
2728 // 토큰 만료로 인한 자동 로그아웃이므로 조용히 처리
2829 console . log ( '토큰 만료로 인한 자동 로그아웃' , error ) ;
Original file line number Diff line number Diff line change @@ -133,8 +133,17 @@ const EventCard = ({
133133 onDeleteSuccess ?.( id ) ;
134134 setIsModalOpen ( false ) ;
135135 } ,
136- onError : ( ) => {
137- alert ( '이벤트 삭제에 실패했습니다.' ) ;
136+ onError : ( error : unknown ) => {
137+ if (
138+ typeof error === 'object' &&
139+ error !== null &&
140+ 'code' in error &&
141+ (
142+ error as { code ? : string } ) . code === "EVENT4002"
143+ ) {
144+ console . log ( '참여자로 인한 이벤트 삭제 실패' ) ;
145+ alert ( '구매자가 있는 이벤트는 삭제가 불가합니다.' ) ;
146+ }
138147 setIsModalOpen ( false ) ;
139148 } ,
140149 } ) ;
You can’t perform that action at this time.
0 commit comments