Edit Contact but without loading?
This commit is contained in:
10
src/app/(sidebar)/loaders.ts
Normal file
10
src/app/(sidebar)/loaders.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { getContact, getContacts } from "@/app/data";
|
||||
import { cache } from "react";
|
||||
|
||||
export const fetchContacts = cache(async () => {
|
||||
return await getContacts();
|
||||
});
|
||||
|
||||
export const fetchContact = cache(async (contactId: string) => {
|
||||
return await getContact(contactId);
|
||||
});
|
||||
Reference in New Issue
Block a user