fix allowed ip screen

This commit is contained in:
Ishaan Jaff 2024-07-09 15:57:53 -07:00
parent f3dddd234d
commit b04c4da12e

View file

@ -726,22 +726,22 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
<TableHead> <TableHead>
<TableRow> <TableRow>
<TableHeaderCell>IP Address</TableHeaderCell> <TableHeaderCell>IP Address</TableHeaderCell>
<TableHeaderCell>Action</TableHeaderCell> <TableHeaderCell className="text-right">Action</TableHeaderCell>
</TableRow> </TableRow>
</TableHead> </TableHead>
<TableBody> <TableBody>
{allowedIPs.map((ip, index) => ( {allowedIPs.map((ip, index) => (
<TableRow key={index}> <TableRow key={index}>
<TableCell>{ip}</TableCell> <TableCell>{ip}</TableCell>
<TableCell> <TableCell className="text-right">
<Button onClick={() => handleDeleteIP(ip)} color="red"> <Button onClick={() => handleDeleteIP(ip)} color="red" size="xs">
Delete Delete
</Button> </Button>
</TableCell> </TableCell>
</TableRow> </TableRow>
))} ))}
</TableBody> </TableBody>
</Table> </Table>
</Modal> </Modal>
<Modal <Modal
@ -768,8 +768,16 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
<Modal <Modal
title="Confirm Delete" title="Confirm Delete"
visible={isDeleteIPModalVisible} visible={isDeleteIPModalVisible}
onOk={confirmDeleteIP}
onCancel={() => setIsDeleteIPModalVisible(false)} onCancel={() => setIsDeleteIPModalVisible(false)}
onOk={confirmDeleteIP}
footer={[
<Button className="mx-1"key="delete" onClick={() => confirmDeleteIP()}>
Yes
</Button>,
<Button key="close" onClick={() => setIsDeleteIPModalVisible(false)}>
Close
</Button>
]}
> >
<p>Are you sure you want to delete the IP address: {ipToDelete}?</p> <p>Are you sure you want to delete the IP address: {ipToDelete}?</p>
</Modal> </Modal>