export function getStaticProps({ preview, previewData }) { return { props: { hasProps: true, preview: !!preview, previewData: previewData || null, }, } } export default function({ hasProps, preview, previewData }) { if (!hasProps) { return
Has No Props} return (
{JSON.stringify(preview) + ' and ' + JSON.stringify(previewData)}) }