testing-area / src /routes /destroy.jsx
chartManD's picture
intalacion de nodejs
750887b
raw
history blame
201 Bytes
import { redirect } from "react-router-dom";
import { deleteContact } from "../contacts";
export async function action({ params }) {
await deleteContact(params.contactId);
return redirect("/");
}