Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | import { ManageRewardResponseDto } from '@uniquegood/realworld-adventure-interface';
import { Button, Modal, ModalProps, Table } from 'antd';
import { ColumnsType } from 'antd/es/table';
type DrawListModalProps = {
modalData: ModalProps;
closeModal: () => unknown;
drawList: ManageRewardResponseDto[];
};
export default function DrawListModal({ modalData, closeModal, drawList }: DrawListModalProps) {
const columns: ColumnsType<ManageRewardResponseDto> = [
{
key: 'id',
dataIndex: 'id',
title: 'ID'
},
{
key: 'name',
dataIndex: 'name',
title: '보상 이름'
},
{
key: 'description',
dataIndex: 'description',
title: '보상 설명'
}
];
return (
<Modal
{...modalData}
title="뽑기 보상 목록"
footer={[<Button onClick={closeModal}>닫기</Button>]}
>
<Table dataSource={drawList} columns={columns} />
</Modal>
);
}
|