File size: 538 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Link from 'next/link'

export const dynamic = 'force-dynamic'

function getData() {
  const res = new Promise((resolve) => {
    setTimeout(() => {
      resolve({ message: 'Layout Data!' })
    }, 2000)
  })
  return res
}

export default async function Layout({ children }) {
  const result = await getData()

  return (
    <div>
      <h1>Layout</h1>
      <Link prefetch={undefined} href="/prefetch-auto/justputit">
        Prefetch Link
      </Link>
      {children}
      <h3>{JSON.stringify(result)}</h3>
    </div>
  )
}