Skip to content

Commit

Permalink
fix(next-drupal)!: replace bogus draftModeStores
Browse files Browse the repository at this point in the history
  • Loading branch information
yobottehg committed Dec 6, 2024
1 parent 2f40d7e commit 62fad2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions starters/basic-starter/components/misc/DraftAlert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Suspense fallback={null}>
Expand Down
3 changes: 1 addition & 2 deletions starters/graphql-starter/app/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ export async function generateStaticParams(): Promise<NodePageParams[]> {
}

export default async function Page({ params: { slug } }: NodePageProps) {
const draftModeStore = await draftMode()
const isDraftMode = draftModeStore.isEnabled
const isDraftMode = (await draftMode()).isEnabled

let node
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Suspense fallback={null}>
Expand Down

0 comments on commit 62fad2d

Please sign in to comment.