mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This adds tests to ensure preview mode pages aren't cached and made publicly available or written to the disk. Closes: https://github.com/vercel/next.js/issues/16020
21 lines
391 B
JavaScript
21 lines
391 B
JavaScript
export default function Post(props) {
|
|
return <p id="props">{JSON.stringify(props)}</p>
|
|
}
|
|
|
|
export const getStaticProps = ({ preview, previewData, params }) => {
|
|
return {
|
|
props: {
|
|
params,
|
|
preview: !!preview,
|
|
previewData: previewData || null,
|
|
},
|
|
}
|
|
}
|
|
|
|
export const getStaticPaths = () => {
|
|
return {
|
|
paths: ['/no-fallback/first'],
|
|
fallback: false,
|
|
}
|
|
}
|