Skip to content

Commit

Permalink
rephrase
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 9, 2024
1 parent 3a19488 commit e60c0a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ export function generateMetadata(props: Props, parent: any) {
}

export default async function Page(props: Props) {
const config = { /* Next.js Dynamic Async API Codemod: 'props' is spread as props. Any asynchronous properties of 'props' must be awaited when accessed. */
const config = { /* Next.js Dynamic Async API Codemod: 'props' is used with spread syntax (...). Any asynchronous properties of 'props' must be awaited when accessed. */
...props }
return (
(<Child /* Next.js Dynamic Async API Codemod: 'props' is spread as props. Any asynchronous properties of 'props' must be awaited when accessed. */
(<Child /* Next.js Dynamic Async API Codemod: 'props' is used with spread syntax (...). Any asynchronous properties of 'props' must be awaited when accessed. */
{...props} {...config} />)
);
}

export function GET(req, ctx) {
console.log(
{ /* Next.js Dynamic Async API Codemod: 'ctx' is spread as props. Any asynchronous properties of 'props' must be awaited when accessed. */
{ /* Next.js Dynamic Async API Codemod: 'ctx' is used with spread syntax (...). Any asynchronous properties of 'ctx' must be awaited when accessed. */
...ctx }
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ function commentSpreadProps(
const objSpreadProperties = functionBodyCollection.find(j.SpreadElement, {
argument: { name: propsIdentifierName },
})
const comment = ` Next.js Dynamic Async API Codemod: '${propsIdentifierName}' is spread as props. Any asynchronous properties of '${propsIdentifierName}' must be awaited when accessed. `
const comment = ` Next.js Dynamic Async API Codemod: '${propsIdentifierName}' is used with spread syntax (...). Any asynchronous properties of '${propsIdentifierName}' must be awaited when accessed. `

// Add comment before it
jsxSpreadProperties.forEach((spread) => {
Expand Down

0 comments on commit e60c0a1

Please sign in to comment.