import { Form, redirect, useLoaderData, useNavigate } from "react-router-dom"; import { updateContact } from "../contacts"; export async function action({ request, params }) { const formData = await request.formData(); const updates = Object.fromEntries(formData); await updateContact(params.contactId, updates); return redirect(`/contacts/${params.contactId}`); } export default function EditContact() { const { contact } = useLoaderData(); const navigate = useNavigate(); return (

Name