When i trying go to /en/vacancies/13 page - getting 404 error
My project looks like - pages/vacancies/[id] file.
If i not use i18n just go to /vacancies/1 - if it is default lang i dont get error
export const getStaticPaths: GetStaticPaths<{ id: string }> = async () => {
let paths;
await axios.get(`https://career.tele2.kz/cms/vacancies`).then(response => {
const prePaths = response.data.map((vacancy:any) => {
const arr = [{ id: vacancy.id.toString(), locale: vacancy.locale }, ...vacancy.localizations];
arr.map( (it) => {
return {params: it}
});
return arr;
});
const merged = [].concat.apply([], prePaths);
paths = merged.map( (item:any) => {
return {params: {id: item.id.toString(), locale: item.locale}}
})
});
return { paths, fallback: false }
};
this is my getStaticPaths.
My links looks like
<Link href={asPath} locale="kz"> // or any different locale
How can i solve this 404 error? i don't have directories in pages like en or kz