폼 블록 헤더 렌더링 오류(block 스코프) 수정
This commit is contained in:
@@ -415,50 +415,6 @@ export default function EditorPage() {
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
{block.type === "form" && (() => {
|
||||
const formProps = block.props as FormBlockProps;
|
||||
|
||||
const handleSubmitEditor = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
// 에디터에서는 실제 전송 대신 데모만 수행한다.
|
||||
};
|
||||
|
||||
return (
|
||||
<form className="space-y-2" onSubmit={handleSubmitEditor}>
|
||||
<div className="flex flex-col gap-1 text-xs text-slate-400">
|
||||
<span>이름</span>
|
||||
<input
|
||||
className="w-full rounded border border-slate-700 bg-slate-900 px-2 py-1 text-xs outline-none focus:border-sky-500"
|
||||
placeholder="이름을 입력하세요"
|
||||
name="name"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1 text-xs text-slate-400">
|
||||
<span>이메일</span>
|
||||
<input
|
||||
className="w-full rounded border border-slate-700 bg-slate-900 px-2 py-1 text-xs outline-none focus:border-sky-500"
|
||||
placeholder="you@example.com"
|
||||
name="email"
|
||||
type="email"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1 text-xs text-slate-400">
|
||||
<span>메시지</span>
|
||||
<textarea
|
||||
className="w-full min-h-[80px] rounded border border-slate-700 bg-slate-900 px-2 py-1 text-xs outline-none focus:border-sky-500"
|
||||
placeholder="전달할 내용을 입력하세요"
|
||||
name="message"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
type="submit"
|
||||
className="inline-flex items-center justify-center rounded border border-emerald-600 bg-emerald-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-600"
|
||||
>
|
||||
폼 전송 (미리보기)
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user