fix(poster): P2V 서버 미연결 상태에서 무빙포스터·스타일링 상호작용 임시 비활성화

This commit is contained in:
김성경 2026-08-24 14:35:16 +09:00
parent 8ba5546f85
commit 487d0f6d6a
2 changed files with 22 additions and 15 deletions

View File

@ -25,20 +25,22 @@ const PosterCreateForm: React.FC<PosterCreateFormProps> = ({ onSubmitted }) => {
const [authNeeded, setAuthNeeded] = useState(false); const [authNeeded, setAuthNeeded] = useState(false);
const submit = async () => { const submit = async () => {
if (!file || submitting) return; // P2V 서버(:8010) 미연결 — 프론트만 구현된 상태라 제출 동작을 임시로 끈다.
setSubmitting(true); // 서버 연결되면 아래 주석을 해제할 것.
setError(null); // if (!file || submitting) return;
try { // setSubmitting(true);
const { id } = await createPosterJob(file, name.trim()); // setError(null);
onSubmitted(id); // try {
} catch (e) { // const { id } = await createPosterJob(file, name.trim());
if (e instanceof P2vAuthError) { // onSubmitted(id);
setAuthNeeded(true); // } catch (e) {
} else { // if (e instanceof P2vAuthError) {
setError((e as Error).message); // setAuthNeeded(true);
} // } else {
setSubmitting(false); // setError((e as Error).message);
} // }
// setSubmitting(false);
// }
}; };
if (authNeeded) { if (authNeeded) {

View File

@ -85,7 +85,12 @@ const StylingContent: React.FC = () => {
} }
}, []); }, []);
useEffect(() => { loadAll(); }, [loadAll]); useEffect(() => {
// P2V 서버(:8010) 미연결 — 프론트만 구현된 상태라 자동 로드를 임시로 끈다.
// 서버 연결되면 아래 주석을 해제할 것. (templates/categories/formats/hint 가
// 계속 비어 있으면 아래 렌더링에서 템플릿 카드·제출 버튼이 자연히 비활성 상태가 된다.)
// loadAll();
}, [loadAll]);
const uploadReference = async (f: File) => { const uploadReference = async (f: File) => {
setRefBusy(true); setRefBusy(true);