"use client"; import { SectionEditor } from "../_components/SectionEditor"; import { InputField, TextareaField } from "../_components/FormField"; import { ArrayEditor } from "../_components/ArrayEditor"; interface FAQData { title: string; items: { question: string; answer: string }[]; } export default function FAQEditorPage() { return ( sectionKey="faq" title="FAQ"> {(data, update) => ( <> update({ ...data, title: v })} /> update({ ...data, items })} renderItem={(item, _i, updateItem) => (
updateItem({ ...item, question: v })} /> updateItem({ ...item, answer: v })} rows={3} />
)} createItem={() => ({ question: "", answer: "" })} addLabel="Добавить вопрос" /> )} ); }