From 57d50d373cafe22a8b4de2b5a5ea9f9b505ce55f Mon Sep 17 00:00:00 2001 From: CheeseB <2489ckckck@naver.com> Date: Fri, 29 Mar 2024 08:16:56 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=BD=94=EB=93=9C=EB=A6=AC?= =?UTF-8?q?=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calendar/ModalContents/index.tsx | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/components/calendar/ModalContents/index.tsx b/src/components/calendar/ModalContents/index.tsx index fd883c76..7b188bd6 100644 --- a/src/components/calendar/ModalContents/index.tsx +++ b/src/components/calendar/ModalContents/index.tsx @@ -37,10 +37,10 @@ const ModalContents = ({ gameId, activeDate, onClickCloseButton, onClickCardButt }; const ReservationMockData: Record = { - '0-confirmed': reservationDetailMockDataConfirmed as DetailReservationResponse, - '0-declined': reservationDetailMockDataDeclined as DetailReservationResponse, - '0-pending': reservationDetailMockDataPending as DetailReservationResponse, - '1-pending': reservationDetailMockDataPendingNoData as DetailReservationResponse, + '1-0-confirmed': reservationDetailMockDataConfirmed as DetailReservationResponse, + '1-0-declined': reservationDetailMockDataDeclined as DetailReservationResponse, + '1-0-pending': reservationDetailMockDataPending as DetailReservationResponse, + '1-1-pending': reservationDetailMockDataPendingNoData as DetailReservationResponse, }; const dropdownOptions = getScheduleDropdownOption(DailyMockData[activeDate]); @@ -60,22 +60,19 @@ const ModalContents = ({ gameId, activeDate, onClickCloseButton, onClickCardButt const currentDeviceType = useDeviceType(); - const { totalCount, reservations } = ReservationMockData[`${scheduleId}-${selectedStatus}`]; + const { totalCount, reservations } = ReservationMockData[`${gameId}-${scheduleId}-${selectedStatus}`]; + + const handleChangeTabId = (selectedId: string | number) => { + setSelectedStatus(selectedId as MyReservationsStatus); + }; const handleChangeScheduleId = (value: string | number) => { setScheduleId(value as number); }; - console.log(gameId); - return (
- setSelectedStatus(selectedId as MyReservationsStatus)} - /> +

예약 날짜

{getDateStringKR(activeDate)}