export async function getStaticProps({ params, locale }) {
const { slug } = params;
// Fetch post data based on the slug
const post = await getPost(slug);
return {
props: {
...(await serverSideTranslations(locale, ["common"])),
post,
},
};
}
export async function getStaticPaths({}) {
return {
paths: [],
fallback: true
};
}
Using I18 next for the translation in a next js project. In my localhost it is working fine. But after deploymwnt, I am not getting the translations. it is a dynamic route and directory is news-detail/[slug].js
I am deploying using vercel