Skip to content

Commit

Permalink
Reduce further
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored and ztanner committed Jan 7, 2025
1 parent d325ca9 commit 5caecd9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/e2e/app-dir/navigation-layout-suspense/app/nested/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ import Link from 'next/link'

export const dynamic = 'force-dynamic'

async function LoadData() {
await fetch('https://next-data-api-endpoint.vercel.app/api/random?b').then(
(res) => res.text()
)
return <div>Got API Response </div>
}

export default async function Layout(props) {
return (
<>
Expand All @@ -18,10 +11,7 @@ export default async function Layout(props) {
Home Page
</Link>
</div>
<Suspense fallback={<h1>Loading...</h1>}>
{props.children}
<LoadData />
</Suspense>
<Suspense fallback={<h1>Loading...</h1>}>{props.children}</Suspense>
</>
)
}

0 comments on commit 5caecd9

Please sign in to comment.