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

export default function QuestionsManage() {
  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' }}>
          <QuestionsList />
        </div>
      </Modal>
    </>
  );
}
