const OperatiOnButtons= ({record,}) => {
const [{ data, loading, error}, refetch] = useAxios('http://www.baidu.com', {'manual': true});
return (
OnClick={() => {
Dialog.confirm({
title: "Confirm",
content: 'Do you want to send request?',
onOk: () => {
refetch();
if (error) {
console.log(error);
}
else {
console.log(data);
}
}
});
}}
>
Request
)
}
const TestTable = () => {
const [{data, loading, error}, refetch] = useAxios('http://data.cdc.gov/data.json');
return (
dataSource={data?.dataset}
loading={loading}
columns={[
{
title: 'title',
dataIndex: 'title',
},
{
title: 'identifier',
dataIndex: 'identifier',
},
{
title: 'operations',
cell: (value, index, record) => (
)
}
]}
/>
);
};