How to call an endpoint after onClick
I have the following button
<Button
size="small"
color="green"
onClick={() => turnOnDevice(record.id)}
disabled={record.is_alive}
loading={deleteManyIsLoading}
icon={<CheckOutlined />}
/>
how to make a rest call to the api
<Button
size="small"
color="green"
onClick={() => turnOnDevice(record.id)}
disabled={record.is_alive}
loading={deleteManyIsLoading}
icon={<CheckOutlined />}
/>
how to make a rest call to the api
