Skip to content

Commit e461da5

Browse files
authored
Merge pull request #277 from wunderio/feature/NEX-185
NEX-185: Update to next-drupal 2.0
2 parents c79649a + 603b94f commit e461da5

File tree

6 files changed

+26
-28
lines changed

6 files changed

+26
-28
lines changed

drupal/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"drupal/migrate_source_csv": "^3.5",
3434
"drupal/migrate_tools": "^6.0",
3535
"drupal/monolog": "^3.0@beta",
36-
"drupal/next": "^2.0@beta",
36+
"drupal/next": "^2.0",
3737
"drupal/paragraphs": "^1.18",
3838
"drupal/pathauto": "^1.13",
3939
"drupal/redirect": "^1.10",

drupal/composer.lock

Lines changed: 14 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

next/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

next/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"lucide-react": "^0.469.0",
4646
"next": "^14.2.22",
4747
"next-auth": "^5.0.0-beta.25",
48-
"next-drupal": "^2.0.0-beta.1",
48+
"next-drupal": "^2.0.0",
4949
"next-intl": "^3.26.3",
5050
"next-themes": "^0.4.4",
5151
"p-retry": "^6.2.1",
@@ -100,10 +100,5 @@
100100
"tailwindcss": "^3.4.17",
101101
"ts-node": "^10.9.2",
102102
"typescript": "^5.6.2"
103-
},
104-
"overrides": {
105-
"next-drupal": {
106-
"next": "$next"
107-
}
108103
}
109104
}

next/src/app/[locale]/(dynamic)/[...slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default async function NodePage({
8686
// In this case, the draftData will contain the resourceVersion property,
8787
// which we can use to fetch the correct revision:
8888
if (isDraftMode) {
89-
const draftData = getDraftData();
89+
const draftData = await getDraftData();
9090

9191
if (
9292
draftData &&

next/src/app/api/disable-draft/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export async function GET(request: NextRequest) {
88
const { searchParams } = new URL(request.url);
99
const callbackPath = searchParams.get("callbackPath");
1010

11-
disableDraftMode();
11+
await disableDraftMode();
1212
redirect(callbackPath ?? "/");
1313
}

0 commit comments

Comments
 (0)