60488e68e3
* Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: Steven <steven@ceriously.com> Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
689 B
689 B
Invalid Redirect getStaticProps/getServerSideProps
Why This Error Occurred
The redirect
value returned from your getStaticProps
or getServerSideProps
function had invalid values.
Possible Ways to Fix It
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
},
}
}