mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Delte network
This commit is contained in:
27
components/dialogues/DeleteNetwork.tsx
Normal file
27
components/dialogues/DeleteNetwork.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
"use client";
|
||||
import useNetworks from "@/hooks/useNetworks";
|
||||
|
||||
interface DeleteNetworkProps {
|
||||
networkId: string;
|
||||
}
|
||||
|
||||
export default function DeleteNetwork({ networkId }: DeleteNetworkProps) {
|
||||
const { deleteNetwork } = useNetworks();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<dialog id="delete_network" className="modal">
|
||||
<div className="modal-box w-2/3 max-w-2/3">
|
||||
<h3 className="text-lg font-bold">Delete Network</h3>
|
||||
<p className="py-4">Are you sure you want to delete this network?</p>
|
||||
<div className="modal-action">
|
||||
<form method="dialog">
|
||||
<button className="btn">Cancel</button>
|
||||
<button className="btn btn-primary" onClick={() => deleteNetwork(networkId)}>Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user