Migrate to a monorepo setup - step 1 * Move web to subfolder /apps/scandic-web * Yarn + transitive deps - Move to yarn - design-system package removed for now since yarn doesn't support the parameter for token (ie project currently broken) - Add missing transitive dependencies as Yarn otherwise prevents these imports - VS Code doesn't pick up TS path aliases unless you open /apps/scandic-web instead of root (will be fixed with monorepo) * Pin framer-motion to temporarily fix typing issue https://github.com/adobe/react-spectrum/issues/7494 * Pin zod to avoid typ error There seems to have been a breaking change in the types returned by zod where error is now returned as undefined instead of missing in the type. We should just handle this but to avoid merge conflicts just pin the dependency for now. * Pin react-intl version Pin version of react-intl to avoid tiny type issue where formatMessage does not accept a generic any more. This will be fixed in a future commit, but to avoid merge conflicts just pin for now. * Pin typescript version Temporarily pin version as newer versions as stricter and results in a type error. Will be fixed in future commit after merge. * Setup workspaces * Add design-system as a monorepo package * Remove unused env var DESIGN_SYSTEM_ACCESS_TOKEN * Fix husky for monorepo setup * Update netlify.toml * Add lint script to root package.json * Add stub readme * Fix react-intl formatMessage types * Test netlify.toml in root * Remove root toml * Update netlify.toml publish path * Remove package-lock.json * Update build for branch/preview builds Approved-by: Linus Flood
100 lines
2.7 KiB
JavaScript
100 lines
2.7 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('@/types/routes').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('@/types/routes').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('@/types/routes').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('@/types/routes').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('@/types/routes').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('@/types/routes').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('@/types/routes').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('@/types/routes').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('@/types/routes').LangRoute} */
|
|
export const scandicXSAS = {
|
|
da: `${myPages.da}/scandic-x-sas`,
|
|
de: `${myPages.de}/scandic-x-sas`,
|
|
en: `${myPages.en}/scandic-x-sas`,
|
|
fi: `${myPages.fi}/scandic-x-sas`,
|
|
no: `${myPages.no}/scandic-x-sas`,
|
|
sv: `${myPages.sv}/scandic-x-sas`,
|
|
}
|