Skip to content

Commit 827fd8b

Browse files
committed
fix: update route type imports and adjust draft mode client configuration
- Changed the import path for route types in next-env.d.ts to point to the development directory. - Modified the client configuration in route.tsx to disable CDN usage for draft mode, ensuring accurate content retrieval during editing.
1 parent 8d0dfc2 commit 827fd8b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/app/api/draft-mode/enable/route.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { client } from "@/sanity/lib/client";
33
import { token } from "@/sanity/lib/token";
44

55
export const { GET } = defineEnableDraftMode({
6-
client: client.withConfig({ token }),
6+
client: client.withConfig({ token, useCdn: false }),
77
});

‎apps/web/next-env.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/types/routes.d.ts";
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)