Files
JJ KasperandGitHub 990c1792d2 Add tests for preview mode caching (#16579)
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
2020-08-26 11:07:32 +00:00

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,
}
}