mirror of
https://github.com/ktds-dg0501/kt-event-marketing-fe.git
synced 2025-12-06 11:36:24 +00:00
배포하기 버튼 API 호출 주석처리 및 성공 시뮬레이션 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
94e5f2d89a
commit
948eb06e71
@ -28,8 +28,6 @@ import {
|
|||||||
} from '@mui/icons-material';
|
} from '@mui/icons-material';
|
||||||
import { EventData } from '../page';
|
import { EventData } from '../page';
|
||||||
import { cardStyles, colors, responsiveText } from '@/shared/lib/button-styles';
|
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 {
|
interface EventCreationData {
|
||||||
eventDraftId: string;
|
eventDraftId: string;
|
||||||
@ -53,9 +51,6 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
|
|||||||
const [successDialogOpen, setSuccessDialogOpen] = useState(false);
|
const [successDialogOpen, setSuccessDialogOpen] = useState(false);
|
||||||
const [isDeploying, setIsDeploying] = useState(false);
|
const [isDeploying, setIsDeploying] = useState(false);
|
||||||
const [localStorageData, setLocalStorageData] = useState<EventCreationData | null>(null);
|
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(() => {
|
useEffect(() => {
|
||||||
const storedData = localStorage.getItem('eventCreationData');
|
const storedData = localStorage.getItem('eventCreationData');
|
||||||
@ -69,6 +64,8 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
|
|||||||
|
|
||||||
setIsDeploying(true);
|
setIsDeploying(true);
|
||||||
|
|
||||||
|
// API 호출 임시 주석처리 - 배포 성공 시뮬레이션
|
||||||
|
/*
|
||||||
try {
|
try {
|
||||||
// 1. 이벤트 생성 API 호출
|
// 1. 이벤트 생성 API 호출
|
||||||
console.log('📞 Creating event with objective:', eventData.objective);
|
console.log('📞 Creating event with objective:', eventData.objective);
|
||||||
@ -176,6 +173,13 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
|
|||||||
setIsDeploying(false);
|
setIsDeploying(false);
|
||||||
alert('이벤트 배포에 실패했습니다. 다시 시도해 주세요.');
|
alert('이벤트 배포에 실패했습니다. 다시 시도해 주세요.');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 배포 시뮬레이션 (2초 후 성공)
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsDeploying(false);
|
||||||
|
setSuccessDialogOpen(true);
|
||||||
|
}, 2000);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSaveDraft = () => {
|
const handleSaveDraft = () => {
|
||||||
@ -551,9 +555,6 @@ export default function ApprovalStep({ eventData, onApprove, onBack }: ApprovalS
|
|||||||
label={
|
label={
|
||||||
<Typography variant="body2" sx={{ ...responsiveText.body1, fontWeight: 400 }}>
|
<Typography variant="body2" sx={{ ...responsiveText.body1, fontWeight: 400 }}>
|
||||||
이벤트 약관 및 개인정보 처리방침에 동의합니다{' '}
|
이벤트 약관 및 개인정보 처리방침에 동의합니다{' '}
|
||||||
<Typography component="span" sx={{ color: colors.orange, fontWeight: 100 }}>
|
|
||||||
(필수)
|
|
||||||
</Typography>
|
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user