diff --git a/src/app/Layout.tsx b/src/app/Layout.tsx index dcfa0d54..5dc72ffa 100644 --- a/src/app/Layout.tsx +++ b/src/app/Layout.tsx @@ -1,10 +1,10 @@ export default function Layout({ children }: { children: React.ReactNode }) { return ( -
-
-
{children}
-
-
+
+
+
{children}
+
+
); } diff --git a/src/features/dashboard/ui/PariticipantsList.tsx b/src/features/dashboard/ui/PariticipantsList.tsx index 47e6a6d9..fa5f7d80 100644 --- a/src/features/dashboard/ui/PariticipantsList.tsx +++ b/src/features/dashboard/ui/PariticipantsList.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import ParticipantCard from './ParicipantCard'; +import ParticipantCard from './ParticipantCard'; import { useParticipantStore } from '../model/store/ParticipantStore'; import { usePersonalTicketOptionAnswers } from '../../ticket/hooks/useTicketOptionHook'; import OrderAnswerModal from '../../../widgets/dashboard/ui/response/OrderAnswerModal'; diff --git a/src/features/dashboard/ui/ParicipantCard.tsx b/src/features/dashboard/ui/ParticipantCard.tsx similarity index 79% rename from src/features/dashboard/ui/ParicipantCard.tsx rename to src/features/dashboard/ui/ParticipantCard.tsx index e015ec0a..d412be19 100644 --- a/src/features/dashboard/ui/ParicipantCard.tsx +++ b/src/features/dashboard/ui/ParticipantCard.tsx @@ -3,6 +3,7 @@ import SecondaryButton from '../../../../design-system/ui/buttons/SecondaryButto import { useApproveParticipants } from '../hook/useParticipants'; import { ParticipantResponse } from '../model/participantInformation'; import { formatDate, formatTime } from '../../../shared/lib/date'; +import { usePersonalTicketOptionAnswers } from '../../ticket/hooks/useTicketOptionHook'; interface ParticipantCardProps { participant: ParticipantResponse; @@ -12,7 +13,21 @@ interface ParticipantCardProps { } const ParticipantCard = ({ participant, onCheckClick }: ParticipantCardProps) => { - const { mutate: approveParticipant } = useApproveParticipants(participant.id); + const { mutate: approveParticipant } = useApproveParticipants(participant.orderId); + + // useQuery를 사용한 에러 핸들링 + const { error } = usePersonalTicketOptionAnswers(participant.ticketId); + + + // 티켓 옵션 응답 개별 조회 사용 중 -> 올바른 API 수정해야함(에러 핸들링만 처리한 상태) + const handleCheckClick = () => { + if (error) { + alert('응답 데이터가 없습니다.'); + return; + } + onCheckClick(); + }; + return (
@@ -30,7 +45,8 @@ const ParticipantCard = ({ participant, onCheckClick }: ParticipantCardProps) =>
- {} + {/* 에러 핸들링 여기도 수정해야함 */} + {} {participant.checkedIn ? (

완료

) : ( diff --git a/src/features/ticket/hooks/useTicketOptionDnD.ts b/src/features/ticket/hooks/useTicketOptionDnD.ts index 3f5e68af..deba6828 100644 --- a/src/features/ticket/hooks/useTicketOptionDnD.ts +++ b/src/features/ticket/hooks/useTicketOptionDnD.ts @@ -30,7 +30,7 @@ export const useTicketOptionDnD = () => { const ticketId = parseInt(destination.droppableId.replace('ticket-', ''), 10); const ticketOptionId = parseInt(result.draggableId, 10); - if (isNaN(ticketId) || isNaN(ticketOptionId)) { + if (!isNaN(ticketId) && !isNaN(ticketOptionId)) { attachOption({ ticketId, ticketOptionId }); } return; diff --git a/src/main.tsx b/src/main.tsx index 0fe147fe..f6d29404 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -12,7 +12,7 @@ createRoot(document.getElementById('root')!).render( - {import.meta.env.NODE_ENV === 'development' && } + {import.meta.env.DEV && } ); diff --git a/src/pages/event/ui/create-event/FunnelPage.tsx b/src/pages/event/ui/create-event/FunnelPage.tsx index 8999a6fc..0b2e9be3 100644 --- a/src/pages/event/ui/create-event/FunnelPage.tsx +++ b/src/pages/event/ui/create-event/FunnelPage.tsx @@ -3,6 +3,7 @@ import { useFunnel } from '../../../../features/event/hooks/useFunnelHook'; import EventFunnel from '../../../../features/event/ui/EventFunnel'; import { useLocation, useNavigate } from 'react-router-dom'; import { FunnelProvider } from '../../../../features/event/model/FunnelContext'; +// import { MAIN_ROUTES } from '../../../../app/routes/routes'; const FunnelPage = () => { const { Funnel, Step, setStep, currentStep, steps } = useFunnel(0); @@ -19,7 +20,14 @@ const FunnelPage = () => { } }; + + // ${MAIN_ROUTES.eventCreation}?step=${steps[0]}` const onPrevClick = () => { + if (currentStep === 1 || currentStep === 2) { + // HostCreation에서 뒤로가기: 브라우저 히스토리 뒤로 + navigate(-1); + return; + } const prevStep = previousStep.pop(); if (prevStep !== undefined) { setStep(prevStep); @@ -38,6 +46,15 @@ const FunnelPage = () => { } }, [location.search, setStep, steps]); + // Funnel current step을 HostSelection으로 초기화 + useEffect(() => { + setStep(0); + setPreviousStep([]); + if (!new URLSearchParams(location.search).get('step')) { + navigate(`${location.pathname}?step=${steps[0]}`, { replace: true }); + } + }, []); + return ( { console.error('호스트 삭제 실패:', error); + alert(`${error.message}`); }, }); }; @@ -50,24 +51,24 @@ const HostSelectionPage = ({ onNext, currentStep, onValidationChange }: HostSele return (
-
{ - if (!isLoggedIn) { - alert('로그인이 필요한 서비스입니다.'); - return; - } - onNext(String(currentStep + 1)); - }} - className="flex justify-start items-center px-3 py-4 cursor-pointer" - > - - 채널 새로 만들기 -
+ {isLoggedIn ? ( +
{ + onNext(String(currentStep + 1)); + }} + className="flex justify-start items-center px-3 py-4 cursor-pointer" + > + + 채널 새로 만들기 +
+ ) : ( +

로그인이 필요한 서비스입니다.

+ )} {data?.result.map(host => (
{
{icon}
{title} -

{value}

+

{value}

); diff --git a/tailwind.config.js b/tailwind.config.js index 1c789dd8..eb967878 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -51,6 +51,8 @@ export default { 14: '14px', 15: '15px', 16: '16px', + 17: '17px', + 18: '18px', 19: '19px', 20: '20px', 21: '21px',