File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 77 eventParticipationProfileResponseList ,
88 FetchUserResponse ,
99} from '@/interfaces/SnackEvent' ;
10- import { formatDateTimeWithDay } from '@/utils/date' ;
10+ import { formatToMonthDay } from '@/utils/date' ;
1111import Header from '@/components/Layout/header/Header' ;
1212import DefaultBody from '@/components/Layout/Body/defaultBody' ;
1313import SearchInput from '@/components/common/SearchInput' ;
@@ -65,7 +65,7 @@ const TicketingUserListPage: FC = () => {
6565 ) ;
6666 const eventList =
6767 response ?. data ?. eventParticipationProfileResponseList ?? [ ] ;
68- setEventEndTime ( formatDateTimeWithDay ( response . data . eventEndTime ) ) ;
68+ setEventEndTime ( formatToMonthDay ( response . data . eventEndTime ) ) ;
6969 setTitle ( response . data . title ) ;
7070 setStock ( response . data . stock ) ;
7171 setWaitNum ( response . data . waitNum ) ;
@@ -188,7 +188,7 @@ const TicketingUserListPage: FC = () => {
188188
189189 < Header
190190 showBack
191- title = { `${ formatMonthDayFromKoreanDate ( eventEndTime ) } ${ title } ` }
191+ title = { `${ eventEndTime } ${ title } ` }
192192 showDownload = { {
193193 endpoint : `/ticketing/ticketing/excel/${ eventId } ` ,
194194 filename : `${ eventEndTime } ${ title } 참가자 목록` ,
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ const TicketingPage: FC = () => {
165165 < p className = "font-semibold text-[14px]" > { snack . eventTitle } </ p >
166166 < p className = "text-[25px] text-[#0D99FF] mt-[-17px]" > •</ p >
167167 </ div >
168- < div className = "mt-[22px] text-[12px] text-black" > { formatDateTimeWithDay ( snack . eventEndTime ) } </ div >
168+ < div className = "mt-[22px] text-[12px] text-black" > { snack . eventEndTime } </ div >
169169 < div className = "text-[12px] text-black" > { snack . locationInfo } </ div >
170170 < div className = "text-[12px] text-[#0D99FF]" > 잔여수량 { snack . currentQuantity } | 수령대기 { snack . waitQuantity } </ div >
171171
Original file line number Diff line number Diff line change @@ -54,3 +54,16 @@ export const parseBackendDateToLocalDateTime = (str: string) => {
5454 return `${ datePart } T${ timePart } ` ;
5555} ;
5656
57+ // "2025.11.25 (화) 16:44" → 11/25 형식으로 바꿔주는 함수입니다.
58+ export function formatToMonthDay ( raw : string ) : string {
59+ // 1) 숫자만 추출: 2025.12.02 -> 2025 12 02
60+ const match = raw . match ( / ( \d { 4 } ) [ . \- \/ ] ( \d { 1 , 2 } ) [ . \- \/ ] ( \d { 1 , 2 } ) / ) ;
61+
62+
63+ if ( ! match ) return "" ;
64+
65+ const [ , year , month , day ] = match ;
66+ console . log ( month , '/' , day ) ;
67+ return `${ month } /${ day } ` ;
68+ }
69+
You can’t perform that action at this time.
0 commit comments