mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
UI Fixes & reload
This commit is contained in:
@@ -4,13 +4,19 @@ import { Trash2, AlertTriangle } from "lucide-react";
|
||||
|
||||
interface DeleteNetworkProps {
|
||||
networkId: string;
|
||||
onNetworkDeleted?: () => void;
|
||||
}
|
||||
|
||||
export default function DeleteNetwork({ networkId }: DeleteNetworkProps) {
|
||||
export default function DeleteNetwork({ networkId, onNetworkDeleted }: DeleteNetworkProps) {
|
||||
const { deleteNetwork } = useNetworks();
|
||||
|
||||
const handleDelete = () => {
|
||||
deleteNetwork(networkId);
|
||||
setTimeout(() => {
|
||||
if (onNetworkDeleted) {
|
||||
onNetworkDeleted();
|
||||
}
|
||||
}, 500);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user