-
Notifications
You must be signed in to change notification settings - Fork 27.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
229 additions
and
79 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...__/next-async-request-api-dynamic-apis/async-component-access-api-prop-03.output copy.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// If it's sync default export, convert to async and await the function call | ||
import { draftMode } from 'next/headers' | ||
|
||
export default async function MyComponent() { | ||
(await draftMode()).enable() | ||
} |
5 changes: 5 additions & 0 deletions
5
...ures__/next-async-request-api-dynamic-apis/generate-metadata-access-api-prop-01.input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { headers } from 'next/headers' | ||
|
||
export function generateMetadata() { | ||
headers() | ||
} |
5 changes: 5 additions & 0 deletions
5
...res__/next-async-request-api-dynamic-apis/generate-metadata-access-api-prop-01.output.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { headers } from 'next/headers' | ||
|
||
export async function generateMetadata() { | ||
await headers() | ||
} |
5 changes: 5 additions & 0 deletions
5
...ures__/next-async-request-api-dynamic-apis/generate-metadata-access-api-prop-02.input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { headers } from 'next/headers' | ||
|
||
export const generateMetadata = function () { | ||
headers() | ||
} |
5 changes: 5 additions & 0 deletions
5
...res__/next-async-request-api-dynamic-apis/generate-metadata-access-api-prop-02.output.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { headers } from 'next/headers' | ||
|
||
export const generateMetadata = async function() { | ||
await headers() | ||
} |
3 changes: 1 addition & 2 deletions
3
...__testfixtures__/next-async-request-api-dynamic-apis/sync-component-use-cookies.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import { use } from "react"; | ||
import { cookies } from "next/headers"; | ||
|
||
function MyComponent() { | ||
callSomething(use(cookies())); | ||
callSomething(cookies()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.