import { Suspense } from 'react'
import { cookies, headers } from 'next/headers'
import { connection } from 'next/server'
export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>
{children}
<Suspense>
<HangingCalls />
</Suspense>
</body>
</html>
)
}
async function HangingCalls() {
// We purposely do not await these to prevent React from suppressing the rejection error
cookies().then(() => {})
headers().then(() => {})
connection().then(() => {})
return null
}