Edit Contact but without loading?

This commit is contained in:
2025-04-01 17:14:43 +02:00
parent a4536d20b4
commit aa81948f29
6 changed files with 97 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import { getContact } from "@/app/data";
import { notFound } from "next/navigation";
import Contact from "@/app/(sidebar)/contacts/[contactId]/Contact";
import { fetchContact } from "@/app/(sidebar)/loaders";
export default async function ContactPage({
params
@@ -8,7 +8,7 @@ export default async function ContactPage({
params: Promise<{ contactId: string }>
}) {
const { contactId } = await params;
const contact = getContact(contactId).then((c) => {
const contact = fetchContact(contactId).then((c) => {
if (c === null) notFound();
return c;
});