Remove caching. That caching is breaking the program in case of change.

Note: "use server" is not good because force the fetch to be action/static so the client doesn't call them again explicitly during render (I think?)
This commit is contained in:
2025-04-01 17:58:11 +02:00
parent 800c231580
commit 434b7c8dc8

View File

@@ -1,10 +1,9 @@
import { getContact, getContacts } from "@/app/data";
import { cache } from "react";
export const fetchContacts = cache(async () => {
export const fetchContacts = async () => {
return await getContacts();
});
};
export const fetchContact = cache(async (contactId: string) => {
export const fetchContact = async (contactId: string) => {
return await getContact(contactId);
});
};