Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 22, 2024
1 parent 92df15a commit 8093d57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import { Suspense, unstable_postpone as postpone } from 'react'
import { Optimistic } from '../../../components/optimistic'
import { ServerHtml } from '../../../components/server-html'

export default async (props) => {
const searchParams = await props.searchParams
export default (props) => {
return (
<>
<ServerHtml />
<Suspense fallback="loading...">
<Optimistic searchParams={searchParams} />
<Optimistic searchParams={props.searchParams} />
</Suspense>
<Suspense fallback="loading...">
<IncidentalPostpone />
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/app-dir/ppr-full/app/dynamic-data/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import { Suspense } from 'react'
import { Optimistic } from '../../components/optimistic'
import { ServerHtml } from '../../components/server-html'

export default async (props) => {
const searchParams = await props.searchParams
export default (props) => {
return (
<>
<ServerHtml />
<Suspense fallback="loading...">
<Optimistic searchParams={searchParams} />
<Optimistic searchParams={props.searchParams} />
</Suspense>
</>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { headers } from 'next/headers'
import { Suspense } from 'react'
import { setTimeout } from 'timers/promises'

function Dynamic() {
const agent = headers().get('user-agent')
async function Dynamic() {
const agent = (await headers()).get('user-agent')

return <div data-agent={agent}>{agent}</div>
}

export default async function Page({ params }) {
export default async function Page(props) {
const params = await props.params
await setTimeout(1000)

const { slug } = params
Expand Down

0 comments on commit 8093d57

Please sign in to comment.