feat(WEB-132): add middlewares, support for seamless login and improve lang based routes

This commit is contained in:
Michael Zetterberg
2024-04-08 16:08:35 +02:00
parent 8ab5325fc3
commit 7093a0b2dd
31 changed files with 493 additions and 188 deletions

View File

@@ -0,0 +1,28 @@
/**
* @file Due to these records being used in next.config.js, and that is required
* to be a js file, we use jsdoc to type these.
*/
/**
* These are routes that define code entries for My pages
*/
/** @type {import('@/types/routes').LangRoute} */
export const myPages = {
da: "/da/mine-sider",
de: "/de/mein-profil",
en: "/en/my-pages",
fi: "/fi/minun-sivujani",
no: "/no/mine-sider",
sv: "/sv/mina-sidor",
}
/** @type {import('@/types/routes').LangRoute} */
export const profile = {
da: `${myPages.da}/profil-da`,
de: `${myPages.de}/profile-de`,
en: `${myPages.en}/profile-en`,
fi: `${myPages.fi}/profile-fi`,
no: `${myPages.no}/profile-no`,
sv: `${myPages.sv}/profile-sv`,
}