mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
20 lines
357 B
JavaScript
20 lines
357 B
JavaScript
import { use } from 'react'
|
|
|
|
async function getData() {
|
|
await new Promise((resolve) => setTimeout(resolve, 5000))
|
|
return {
|
|
message: 'hello from slow layout',
|
|
}
|
|
}
|
|
|
|
export default function gspLayout(props) {
|
|
const data = use(getData())
|
|
|
|
return (
|
|
<>
|
|
<h1 id="slow-layout-message">{data.message}</h1>
|
|
{props.children}
|
|
</>
|
|
)
|
|
}
|