I have this in my getStaticProps function:
getStaticProps() {
const res = await axios({
method: "post",
url: url
});
let data = res.data;
if (!data)
return {
notFound: true,
};
return {
props: { data: data || null },
revalidate: 5,
};
}
Locally everything runs fine (when an update is made to the database it is shown on the website), but in production (the website is on vercel) the data isn't getting revalidated even after the revalidation period is passed, so I basically have the same data even if it is changed in the database
Any ideas what the problem could be?