File size: 684 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 29 |
import Link from 'next/link'
import { after } from 'next/server'
import React from 'react'
import { fetchRandomValue } from '../lib/fetch-random-value'
import { RefreshButton } from './refresh-button'
export async function SharedPage({ runtime }: { runtime: string }) {
const value = await fetchRandomValue(`render-${runtime}`)
after(async () => {
const value = await fetchRandomValue(`after-${runtime}`)
console.log('After:', value)
})
return (
<>
<h1>{runtime}</h1>
<p id="content">foo</p>
<p id="value">{value}</p>
<p>
<Link href="/">back to root</Link>
</p>
<p>
<RefreshButton />
</p>
</>
)
}
|