Additional keys were returned from `getServerSideProps`. Properties intended for your component must
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
Getting the above error for this peace of code
export const getServerSideProps = async ({ query }) => {
const response = await axios.get(`${API_URL}/productspublic/${query.seo}`);
return {
props: {
resData: response.data,
seo: query.seo,
},
revalidate: 10, // In seconds
};
};3 Replies
@Transvaal lion Getting the above error for this peace of code
export const getServerSideProps = async ({ query }) => {
const response = await axios.get(`${API_URL}/productspublic/${query.seo}`);
return {
props: {
resData: response.data,
seo: query.seo,
},
revalidate: 10, // In seconds
};
};
getServerSideProps doesn't have revalidate. maybe you are looking for getStaticProps instead?