diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 5798fd0a9..bec9801ef 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -346,4 +346,4 @@ "{amount} {currency}": "{amount} {currency}", "{difference}{amount} {currency}": "{difference}{amount} {currency}", "{width} cm × {length} cm": "{width} cm × {length} cm" -} +} \ No newline at end of file diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index 39c9364cd..ed2dc9439 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -346,4 +346,4 @@ "{amount} {currency}": "{amount} {currency}", "{difference}{amount} {currency}": "{difference}{amount} {currency}", "{width} cm × {length} cm": "{width} cm × {length} cm" -} +} \ No newline at end of file diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 24740746a..de38d2341 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -347,4 +347,4 @@ "{amount} {currency}": "{amount} {currency}", "{difference}{amount} {currency}": "{difference}{amount} {currency}", "{width} cm × {length} cm": "{width} cm × {length} cm" -} +} \ No newline at end of file diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 77e114db5..10985583c 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -343,4 +343,4 @@ "{amount} {currency}": "{amount} {currency}", "{difference}{amount} {currency}": "{difference}{amount} {currency}", "{width} cm × {length} cm": "{width} cm × {length} cm" -} +} \ No newline at end of file diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index 21ae78f1a..9803d5f6e 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -344,4 +344,4 @@ "{amount} {currency}": "{amount} {currency}", "{difference}{amount} {currency}": "{difference}{amount} {currency}", "{width} cm × {length} cm": "{width} cm × {length} cm" -} +} \ No newline at end of file diff --git a/next.config.js b/next.config.js index d23e3903a..75387bfd4 100644 --- a/next.config.js +++ b/next.config.js @@ -69,6 +69,102 @@ const nextConfig = { return config }, + + // https://nextjs.org/docs/app/api-reference/next-config-js/redirects#header-cookie-and-query-matching + redirects() { + const bedTypeQuery = { + key: "bedType", + type: "query", + value: undefined, + } + const breakfastQuery = { + key: "breakfast", + type: "query", + value: undefined, + } + + return [ + // { + // ---------------------------------------- + // Add all required params that should be + // added from Select Room + // ---------------------------------------- + // source: "/:lang/hotelreservation/:path", + // destination: "/:lang", + // missing: [ + // { + // key: "hotelId", + // type: "query", + // value: undefined, + // }, + // ], + // permanent: false, + // }, + { + source: "/:lang/hotelreservation/breakfast", + destination: "/:lang/hotelreservation/select-bed", + missing: [bedTypeQuery], + permanent: false, + }, + { + source: "/:lang/hotelreservation/details", + destination: "/:lang/hotelreservation/select-bed", + missing: [bedTypeQuery], + permanent: false, + }, + { + source: "/:lang/hotelreservation/details", + destination: "/:lang/hotelreservation/breakfast", + missing: [breakfastQuery], + permanent: false, + }, + { + source: "/:lang/hotelreservation/payment", + destination: "/:lang/hotelreservation/select-bed", + missing: [bedTypeQuery], + permanent: false, + }, + { + source: "/:lang/hotelreservation/payment", + destination: "/:lang/hotelreservation/breakfast", + missing: [breakfastQuery], + permanent: false, + }, + { + source: "/:lang/hotelreservation/payment", + destination: "/:lang/hotelreservation/details", + missing: [ + { + key: "countryCode", + type: "query", + value: undefined, + }, + { + key: "email", + type: "query", + value: undefined, + }, + { + key: "firstname", + type: "query", + value: undefined, + }, + { + key: "lastname", + type: "query", + value: undefined, + }, + { + key: "phoneNumber", + type: "query", + value: undefined, + }, + ], + permanent: false, + }, + ] + }, + rewrites() { return { beforeFiles: [