Files
Jiachi LiuandGitHub 2a7f7ecf4b [test] isolate parallel metadata test (#78134)
### What

Isolate parallel-routes related test cases for streaming metadata into a standalone test suite. Prepared to add more parallel route test cases into it.
2025-04-14 13:40:50 +02:00

23 lines
506 B
TypeScript

import { connection } from 'next/server'
export default function Layout({ bar, foo, children }) {
return (
<div>
<h1>Parallel Routes Layout - No Children</h1>
<div id="foo-slot">{foo}</div>
<div id="bar-slot">{bar}</div>
{/* hitting default.js */}
{children}
</div>
)
}
export async function generateMetadata() {
await connection()
await new Promise((resolve) => setTimeout(resolve, 300))
return {
title: 'parallel-routes-default layout title',
}
}