File tree Expand file tree Collapse file tree 6 files changed +10
-6
lines changed
components/misc/DraftAlert
components/misc/DraftAlert Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,8 @@ export default async function NodePage(props: NodePageProps) {
117117
118118 const { slug } = params
119119
120- const isDraftMode = ( await draftMode ( ) ) . isEnabled
120+ const draft = await draftMode ( )
121+ const isDraftMode = draft . isEnabled
121122
122123 let node
123124 try {
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ import { draftMode } from "next/headers"
33import { DraftAlertClient } from "./Client"
44
55export async function DraftAlert ( ) {
6- const isDraftEnabled = ( await draftMode ( ) ) . isEnabled
6+ const draft = await draftMode ( )
7+ const isDraftEnabled = draft . isEnabled
78
89 return (
910 < Suspense fallback = { null } >
Original file line number Diff line number Diff line change @@ -119,7 +119,8 @@ export async function generateStaticParams(): Promise<NodePageParams[]> {
119119}
120120
121121export default async function Page ( { params : { slug } } : NodePageProps ) {
122- const isDraftMode = ( await draftMode ( ) ) . isEnabled
122+ const draft = await draftMode ( )
123+ const isDraftMode = draft . isEnabled
123124
124125 let node
125126 try {
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ import { draftMode } from "next/headers"
33import { DraftAlertClient } from "./Client"
44
55export async function DraftAlert ( ) {
6- const isDraftEnabled = ( await draftMode ( ) ) . isEnabled
6+ const draft = await draftMode ( )
7+ const isDraftEnabled = draft . isEnabled
78
89 return (
910 < Suspense fallback = { null } >
Original file line number Diff line number Diff line change 11import Image from "next/image"
22import { absoluteUrl , formatDate } from "@/lib/utils"
33import type { DrupalNode } from "next-drupal"
4- import Link from "next/link "
4+ import { Link } from "@/components/navigation/Link "
55
66interface ArticleTeaserProps {
77 node : DrupalNode
Original file line number Diff line number Diff line change 1- import Link from "next/link "
1+ import { Link } from "@/components/navigation/Link "
22
33export function HeaderNav ( ) {
44 return (
You can’t perform that action at this time.
0 commit comments