The redirect
value returned from your getStaticProps
or getServerSideProps
function had invalid values.
Make sure you return the proper values for the redirect
value.
export const getStaticProps = ({ params }) => {
if (params.slug === 'deleted-post') {
return {
redirect: {
permanent: true, // or false
destination: '/some-location',
},
}
}
return {
props: {
// data
},
}
}