"use client"; import { useState } from "react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import PosterDropzone from "@/components/poster-dropzone"; import { apiFetch } from "@/lib/api"; export default function HomePage() { const router = useRouter(); const [file, setFile] = useState(null); const [name, setName] = useState(""); const [busy, setBusy] = useState(false); const [error, setError] = useState(null); const submit = async () => { if (!file) return; setBusy(true); setError(null); try { const fd = new FormData(); fd.append("poster", file); fd.append("name", name); const { id } = await apiFetch<{ id: string }>("/api/f1/jobs", { method: "POST", body: fd }); router.push(`/poster/${id}`); } catch (e) { setError((e as Error).message); setBusy(false); } }; return (
‹ 시작 방법 고르기

포스터를 올려주세요

나레이션·음악·연출까지 자동으로 만들어 9:16 숏폼으로 완성합니다

setName(e.target.value)} /> {error &&

{error}

}

공연 상품페이지 주소가 있나요? 상품페이지로 시작하면 캐스팅·일정까지 담깁니다 →

); }