diff --git a/starters/basic-starter/components/misc/DraftAlert/index.tsx b/starters/basic-starter/components/misc/DraftAlert/index.tsx index b66828e0..9fb5a873 100644 --- a/starters/basic-starter/components/misc/DraftAlert/index.tsx +++ b/starters/basic-starter/components/misc/DraftAlert/index.tsx @@ -3,8 +3,7 @@ import { draftMode } from "next/headers" import { DraftAlertClient } from "./Client" export async function DraftAlert() { - const draftModeStore = await draftMode() - const isDraftEnabled = draftModeStore.isEnabled + const isDraftEnabled = (await draftMode()).isEnabled return ( diff --git a/starters/graphql-starter/app/[...slug]/page.tsx b/starters/graphql-starter/app/[...slug]/page.tsx index b017d169..f47da72e 100644 --- a/starters/graphql-starter/app/[...slug]/page.tsx +++ b/starters/graphql-starter/app/[...slug]/page.tsx @@ -119,8 +119,7 @@ export async function generateStaticParams(): Promise { } export default async function Page({ params: { slug } }: NodePageProps) { - const draftModeStore = await draftMode() - const isDraftMode = draftModeStore.isEnabled + const isDraftMode = (await draftMode()).isEnabled let node try { diff --git a/starters/graphql-starter/components/misc/DraftAlert/index.tsx b/starters/graphql-starter/components/misc/DraftAlert/index.tsx index b66828e0..9fb5a873 100644 --- a/starters/graphql-starter/components/misc/DraftAlert/index.tsx +++ b/starters/graphql-starter/components/misc/DraftAlert/index.tsx @@ -3,8 +3,7 @@ import { draftMode } from "next/headers" import { DraftAlertClient } from "./Client" export async function DraftAlert() { - const draftModeStore = await draftMode() - const isDraftEnabled = draftModeStore.isEnabled + const isDraftEnabled = (await draftMode()).isEnabled return (