From 3f8658f9f33de1aa6d995ceacfe64b275def63db Mon Sep 17 00:00:00 2001 From: cherry2250 Date: Fri, 24 Oct 2025 15:20:24 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?-=20=EC=B1=84=EB=84=90=20=EC=84=A0=ED=83=9D=20=ED=9B=84=20?= =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EB=AF=B8=EB=A6=AC=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0/=ED=8E=B8=EC=A7=91=20=EB=8B=A8=EA=B3=84=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AI 이벤트 추천 -> 배포채널 선택 -> 콘텐츠 미리보기 -> 콘텐츠 편집 -> 최종승인 순서로 변경 - 우리동네TV, 지니TV, SNS 선택 시에만 콘텐츠 단계 진입하도록 조건부 분기 추가 - ContentPreviewStep, ContentEditStep 컴포넌트 임포트 및 funnel에 통합 --- src/app/(main)/events/create/page.tsx | 45 ++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/app/(main)/events/create/page.tsx b/src/app/(main)/events/create/page.tsx index 24991c8..1595442 100644 --- a/src/app/(main)/events/create/page.tsx +++ b/src/app/(main)/events/create/page.tsx @@ -4,6 +4,8 @@ import { useFunnel } from '@use-funnel/browser'; import { useRouter } from 'next/navigation'; import ObjectiveStep from './steps/ObjectiveStep'; import RecommendationStep from './steps/RecommendationStep'; +import ContentPreviewStep from './steps/ContentPreviewStep'; +import ContentEditStep from './steps/ContentEditStep'; import ChannelStep from './steps/ChannelStep'; import ApprovalStep from './steps/ApprovalStep'; @@ -41,6 +43,8 @@ export default function EventCreatePage() { const funnel = useFunnel<{ objective: EventData; recommendation: EventData; + contentPreview: EventData; + contentEdit: EventData; channel: EventData; approval: EventData; }>({ @@ -79,7 +83,46 @@ export default function EventCreatePage() { channel={({ context, history }) => ( { - history.push('approval', { ...context, channels }); + // 우리동네TV, 지니TV, SNS 중 하나라도 포함되어 있으면 contentPreview로 + const needsContent = channels.some((ch) => + ['uriTV', 'genieTV', 'sns'].includes(ch) + ); + + if (needsContent) { + history.push('contentPreview', { ...context, channels }); + } else { + history.push('approval', { ...context, channels }); + } + }} + onBack={() => { + history.go(-1); + }} + /> + )} + contentPreview={({ context, history }) => ( + { + history.push('contentEdit', { + ...context, + contentPreview: { imageStyle }, + }); + }} + onSkip={() => { + history.push('approval', context); + }} + onBack={() => { + history.go(-1); + }} + /> + )} + contentEdit={({ context, history }) => ( + { + history.push('approval', { ...context, contentEdit }); }} onBack={() => { history.go(-1);