import { MyButtons } from '@/common';
import { Modal } from 'antd';
import { useState } from 'react';
import CategoriesIndex from '../categories';

export default function CategoriesModal() {
  const [open, setOpen] = useState(false);

  return (
    <>
      <MyButtons.Default
        size="middle"
        onClick={() => setOpen(true)}
        title="事件分类"
      />
      <Modal
        open={open}
        onCancel={() => setOpen(false)}
        footer={null}
        width="80%"
        destroyOnClose
      >
        <CategoriesIndex />
      </Modal>
    </>
  );
}
