import { Button, Form, Input, message } from "antd"; import { useEffect } from "react"; import { mRequest } from "@/app/_lib/request"; export default function EditIconContent({ item, onRefresh, }: { item: | null; onRefresh: () => void; }) { const [form] = Form.useForm(); console.log(item); useEffect(() => { if (item) { form.setFieldsValue({ ...item }); } else { form.resetFields(); } }, [item, form]); return (