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);