feat(SW-2863): Move contentstack router to trpc package * Add exports to packages and lint rule to prevent relative imports * Add env to trpc package * Add eslint to trpc package * Apply lint rules * Use direct imports from trpc package * Add lint-staged config to trpc * Move lang enum to common * Restructure trpc package folder structure * WIP first step * update internal imports in trpc * Fix most errors in scandic-web Just 100 left... * Move Props type out of trpc * Fix CategorizedFilters types * Move more schemas in hotel router * Fix deps * fix getNonContentstackUrls * Fix import error * Fix entry error handling * Fix generateMetadata metrics * Fix alertType enum * Fix duplicated types * lint:fix * Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package * Fix broken imports * Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package Approved-by: Linus Flood
100 lines
3.0 KiB
JavaScript
100 lines
3.0 KiB
JavaScript
/**
|
|
* @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('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const scandicFriends = {
|
|
da: "/da/scandic-friends",
|
|
de: "/de/scandic-friends",
|
|
en: "/en/scandic-friends",
|
|
fi: "/fi/scandic-friends",
|
|
no: "/no/scandic-friends",
|
|
sv: "/sv/scandic-friends",
|
|
}
|
|
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const myPages = {
|
|
da: `${scandicFriends.da}/mine-sider`,
|
|
de: `${scandicFriends.de}/mein-bereich`,
|
|
en: `${scandicFriends.en}/my-pages`,
|
|
fi: `${scandicFriends.fi}/omat-sivut`,
|
|
no: `${scandicFriends.no}/mine-sider`,
|
|
sv: `${scandicFriends.sv}/mina-sidor`,
|
|
}
|
|
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const overview = {
|
|
da: `${myPages.da}/oversigt`,
|
|
de: `${myPages.de}/uberblick`,
|
|
en: `${myPages.en}/overview`,
|
|
fi: `${myPages.fi}/yleista`,
|
|
no: `${myPages.no}/oversikt`,
|
|
sv: `${myPages.sv}/oversikt`,
|
|
}
|
|
|
|
/** TODO: Update to relevant paths */
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const profile = {
|
|
da: `${myPages.da}/profil`,
|
|
de: `${myPages.de}/profil`,
|
|
en: `${myPages.en}/profile`,
|
|
fi: `${myPages.fi}/profiili`,
|
|
no: `${myPages.no}/profil`,
|
|
sv: `${myPages.sv}/profil`,
|
|
}
|
|
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const profileEdit = {
|
|
da: `${profile.da}/rediger`,
|
|
de: `${profile.de}/bearbeiten`,
|
|
en: `${profile.en}/edit`,
|
|
fi: `${profile.fi}/muokkaa`,
|
|
no: `${profile.no}/rediger`,
|
|
sv: `${profile.sv}/redigera`,
|
|
}
|
|
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const points = {
|
|
da: `${myPages.da}/point`,
|
|
de: `${myPages.de}/punkte`,
|
|
en: `${myPages.en}/points`,
|
|
fi: `${myPages.fi}/pisteet`,
|
|
no: `${myPages.no}/poeng`,
|
|
sv: `${myPages.sv}/poang`,
|
|
}
|
|
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const benefits = {
|
|
da: `${myPages.da}/fordele`,
|
|
de: `${myPages.de}/vorteile`,
|
|
en: `${myPages.en}/benefits`,
|
|
fi: `${myPages.fi}/edut`,
|
|
no: `${myPages.no}/fordeler`,
|
|
sv: `${myPages.sv}/formaner`,
|
|
}
|
|
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const stays = {
|
|
da: `${myPages.da}/ophold`,
|
|
de: `${myPages.de}/aufenthalte`,
|
|
en: `${myPages.en}/stays`,
|
|
fi: `${myPages.fi}/varaukset`,
|
|
no: `${myPages.no}/opphold`,
|
|
sv: `${myPages.sv}/vistelser`,
|
|
}
|
|
|
|
/** @type {import('@scandic-hotels/common/constants/routes/langRoute').LangRoute} */
|
|
export const partnerSas = {
|
|
da: `${myPages.da}/sas-eurobonus`,
|
|
de: `${myPages.de}/sas-eurobonus`,
|
|
en: `${myPages.en}/sas-eurobonus`,
|
|
fi: `${myPages.fi}/sas-eurobonus`,
|
|
no: `${myPages.no}/sas-eurobonus`,
|
|
sv: `${myPages.sv}/sas-eurobonus`,
|
|
}
|