fix(poster): P2V 서버 미연결 상태에서 무빙포스터·스타일링 상호작용 임시 비활성화
This commit is contained in:
parent
8ba5546f85
commit
487d0f6d6a
@ -25,20 +25,22 @@ const PosterCreateForm: React.FC<PosterCreateFormProps> = ({ onSubmitted }) => {
|
||||
const [authNeeded, setAuthNeeded] = useState(false);
|
||||
|
||||
const submit = async () => {
|
||||
if (!file || submitting) return;
|
||||
setSubmitting(true);
|
||||
setError(null);
|
||||
try {
|
||||
const { id } = await createPosterJob(file, name.trim());
|
||||
onSubmitted(id);
|
||||
} catch (e) {
|
||||
if (e instanceof P2vAuthError) {
|
||||
setAuthNeeded(true);
|
||||
} else {
|
||||
setError((e as Error).message);
|
||||
}
|
||||
setSubmitting(false);
|
||||
}
|
||||
// P2V 서버(:8010) 미연결 — 프론트만 구현된 상태라 제출 동작을 임시로 끈다.
|
||||
// 서버 연결되면 아래 주석을 해제할 것.
|
||||
// if (!file || submitting) return;
|
||||
// setSubmitting(true);
|
||||
// setError(null);
|
||||
// try {
|
||||
// const { id } = await createPosterJob(file, name.trim());
|
||||
// onSubmitted(id);
|
||||
// } catch (e) {
|
||||
// if (e instanceof P2vAuthError) {
|
||||
// setAuthNeeded(true);
|
||||
// } else {
|
||||
// setError((e as Error).message);
|
||||
// }
|
||||
// setSubmitting(false);
|
||||
// }
|
||||
};
|
||||
|
||||
if (authNeeded) {
|
||||
|
||||
@ -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) => {
|
||||
setRefBusy(true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user