Files
Sebastian "Sebbie" SilbermannandGitHub 19dcd1339f [instant] Handle more instant declaration patterns (#90251)
Adds handling for 


```tsx
export { unstable_instant } from './config'
       ^
```
```tsx
const unstable_instant = ...
                         ^
export { unstable_instant }
```
```tsx
const instant = ...
                ^
export { instant as unstable_instant }
```
We're not following assignments recursively and stop at the first declaration:
```tsx
const _instant = ...
const instant = _instant
                ^
export { instant as unstable_instant }
```
2026-02-20 14:19:54 -08:00

35 lines
699 B
TypeScript

import { connection } from 'next/server'
import { ReactNode, Suspense } from 'react'
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<Suspense fallback={<div>Root suspense boundary...</div>}>
<html>
<body style={{ fontFamily: 'monospace' }}>
<Header />
<hr />
{children}
</body>
</html>
</Suspense>
)
}
function Header() {
return (
<header>
<a href="/">Home</a>{' '}
<Suspense fallback="...">
<div id="root-layout-timestamp">
<Now />
</div>
</Suspense>
</header>
)
}
async function Now() {
await connection()
return Date.now()
}