Files
Jan PotomsGitHubJJ Kasperkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
9300151118 Allow pages to be async modules to enable top-level-await (#17590)
Co-authored-by: JJ Kasper <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-14 11:55:42 +02:00

16 lines
257 B
React

const gspValue = await Promise.resolve(42)
export async function getStaticProps() {
return {
props: { gspValue },
}
}
export default function Index({ gspValue }) {
return (
<main>
<div id="gsp-value">{gspValue}</div>
</main>
)
}