배포하기 버튼 API 호출 주석처리 및 성공 시뮬레이션 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cherry2250 2025-10-31 14:33:56 +09:00
parent 94e5f2d89a
commit 948eb06e71

View File

@ -28,8 +28,6 @@ import {
} from '@mui/icons-material';
import { EventData } from '../page';
import { cardStyles, colors, responsiveText } from '@/shared/lib/button-styles';
import { eventApi } from '@/entities/event/api/eventApi';
import type { EventObjective } from '@/entities/event/model/types';
interface EventCreationData {
eventDraftId: string;
@ -53,9 +51,6 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
const [successDialogOpen, setSuccessDialogOpen] = useState(false);
const [isDeploying, setIsDeploying] = useState(false);
const [localStorageData, setLocalStorageData] = useState<EventCreationData | null>(null);
const DISTRIBUTION_API_BASE_URL =
process.env.NEXT_PUBLIC_DISTRIBUTION_HOST ||
'http://kt-event-marketing-api.20.214.196.128.nip.io';
useEffect(() => {
const storedData = localStorage.getItem('eventCreationData');
@ -69,6 +64,8 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
setIsDeploying(true);
// API 호출 임시 주석처리 - 배포 성공 시뮬레이션
/*
try {
// 1. 이벤트 생성 API 호출
console.log('📞 Creating event with objective:', eventData.objective);
@ -176,6 +173,13 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
setIsDeploying(false);
alert('이벤트 배포에 실패했습니다. 다시 시도해 주세요.');
}
*/
// 배포 시뮬레이션 (2초 후 성공)
setTimeout(() => {
setIsDeploying(false);
setSuccessDialogOpen(true);
}, 2000);
};
const handleSaveDraft = () => {
@ -551,9 +555,6 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
label={
<Typography variant="body2" sx={{ ...responsiveText.body1, fontWeight: 400 }}>
{' '}
<Typography component="span" sx={{ color: colors.orange, fontWeight: 100 }}>
()
</Typography>
</Typography>
}
/>