1
0
mirror of https://gitlab.com/MisterBiggs/hello-remix.git synced 2025-08-09 07:01:32 +00:00

I got bored and just started reading but fun tut

This commit is contained in:
2025-06-01 00:47:54 -06:00
parent f70bd9680d
commit cc898b4b08
5 changed files with 268 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
import type { ActionFunctionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import invariant from "tiny-invariant";
import { deleteContact } from "../data";
export const action = async ({
params,
}: ActionFunctionArgs) => {
invariant(params.contactId, "Missing contactId param");
await deleteContact(params.contactId);
return redirect("/");
};