import { MyButtons } from '@/common';
import { Modal } from 'antd';
import { useState } from 'react';
import SurveysList from '../components/SurveysList';

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

  return (
    <>
      <MyButtons.Default
        title="问卷设置"
        size="middle"
        onClick={() => setOpen(true)}
      />
      <Modal
        title="问卷设置"
        open={open}
        onCancel={() => setOpen(false)}
        footer={null}
        width="90%"
        style={{ top: 20 }}
        destroyOnClose
      >
        <div style={{ maxHeight: 'calc(100vh - 200px)', overflow: 'auto' }}>
          <SurveysList />
        </div>
      </Modal>
    </>
  );
}
