| @@ -38,17 +38,6 @@ export type CreateItemInputs = { | |||||
| }; | }; | ||||
| export const saveItem = async (data: CreateItemInputs) => { | export const saveItem = async (data: CreateItemInputs) => { | ||||
| <<<<<<< HEAD | |||||
| // try { | |||||
| const item = await serverFetchJson<CreateItemResponse<CreateItemInputs>>(`${BASE_API_URL}/items/new`, { | |||||
| method: "POST", | |||||
| body: JSON.stringify(data), | |||||
| headers: { "Content-Type": "application/json" }, | |||||
| }); | |||||
| revalidateTag("items"); | |||||
| return item | |||||
| }; | |||||
| ======= | |||||
| const item = await serverFetchJson<CreateItemResponse<CreateItemInputs>>( | const item = await serverFetchJson<CreateItemResponse<CreateItemInputs>>( | ||||
| `${BASE_API_URL}/items/new`, | `${BASE_API_URL}/items/new`, | ||||
| { | { | ||||
| @@ -73,4 +62,3 @@ export const fetchAllItemsInClient = cache(async () => { | |||||
| next: { tags: ["items"] }, | next: { tags: ["items"] }, | ||||
| }); | }); | ||||
| }); | }); | ||||
| >>>>>>> da1fb872bf3b92e66cff3af4e1b8d1057c47effa | |||||