From e078c59ac1733bc6992b1efea22d46e044cbf509 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Mon, 18 Nov 2024 14:05:07 +0100 Subject: [PATCH] feat(SW-705): Updated URLs for hotelreservation --- .../HotelReservation/HotelCard/index.tsx | 6 +++--- constants/routes/hotelReservation.js | 13 +++++------- next.config.js | 21 ------------------- 3 files changed, 8 insertions(+), 32 deletions(-) diff --git a/components/HotelReservation/HotelCard/index.tsx b/components/HotelReservation/HotelCard/index.tsx index 4c478d275..f996578c7 100644 --- a/components/HotelReservation/HotelCard/index.tsx +++ b/components/HotelReservation/HotelCard/index.tsx @@ -3,7 +3,7 @@ import { useParams } from "next/dist/client/components/navigation" import { useIntl } from "react-intl" import { Lang } from "@/constants/languages" -import { selectHotelMap } from "@/constants/routes/hotelReservation" +import { selectHotelMap, selectRate } from "@/constants/routes/hotelReservation" import { mapFacilityToIcon } from "@/components/ContentType/HotelPage/data" import ImageGallery from "@/components/ImageGallery" @@ -150,9 +150,9 @@ export default function HotelCard({ size="small" className={styles.button} > - {/* TODO: Localize link and also use correct search params */} + {/* TODO: use correct search params */} diff --git a/constants/routes/hotelReservation.js b/constants/routes/hotelReservation.js index 2224b17b6..94a9cef18 100644 --- a/constants/routes/hotelReservation.js +++ b/constants/routes/hotelReservation.js @@ -1,14 +1,13 @@ /** @type {import('@/types/routes').LangRoute} */ export const hotelReservation = { en: "/en/hotelreservation", - sv: "/sv/hotellbokning", - no: "/no/hotell-reservasjon", - fi: "/fi/hotellivaraus", - da: "/da/hotel-reservation", - de: "/de/hotelreservierung", + sv: "/sv/hotelreservation", + no: "/no/hotelreservation", + fi: "/fi/hotelreservation", + da: "/da/hotelreservation", + de: "/de/hotelreservation", } -// TODO: Translate paths export const selectHotel = { en: `${hotelReservation.en}/select-hotel`, sv: `${hotelReservation.sv}/select-hotel`, @@ -18,7 +17,6 @@ export const selectHotel = { de: `${hotelReservation.de}/select-hotel`, } -// TODO: Translate paths export const selectRate = { en: `${hotelReservation.en}/select-rate`, sv: `${hotelReservation.sv}/select-rate`, @@ -68,7 +66,6 @@ export const payment = { de: `${hotelReservation.de}/payment`, } -// TODO: Translate paths export const selectHotelMap = { en: `${selectHotel.en}/map`, sv: `${selectHotel.sv}/map`, diff --git a/next.config.js b/next.config.js index c65772ab7..29012f230 100644 --- a/next.config.js +++ b/next.config.js @@ -2,7 +2,6 @@ import createJiti from "jiti" import { fileURLToPath } from "url" import { login, logout } from "./constants/routes/handleAuth.js" -import { hotelReservation } from "./constants/routes/hotelReservation.js" import { myPages } from "./constants/routes/myPages.js" const path = fileURLToPath(new URL(import.meta.url)) @@ -278,26 +277,6 @@ const nextConfig = { source: `${myPages.sv}/:path*`, destination: `/sv/my-pages/:path*`, }, - { - source: `${hotelReservation.da}/:path*`, - destination: "/da/hotelreservation/:path*", - }, - { - source: `${hotelReservation.de}/:path*`, - destination: "/de/hotelreservation/:path*", - }, - { - source: `${hotelReservation.fi}/:path*`, - destination: "/fi/hotelreservation/:path*", - }, - { - source: `${hotelReservation.no}/:path*`, - destination: "/no/hotelreservation/:path*", - }, - { - source: `${hotelReservation.sv}/:path*`, - destination: "/sv/hotelreservation/:path*", - }, ], } },