feat(SW-705): Updated URLs for hotelreservation
This commit is contained in:
committed by
Joakim Jäderberg
parent
293800f024
commit
e078c59ac1
@@ -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 */}
|
||||
<Link
|
||||
href={`/en/hotelreservation/select-rate?hotel=${hotelData.operaId}`}
|
||||
href={`${selectRate[lang]}?hotel=${hotelData.operaId}`}
|
||||
color="none"
|
||||
keepSearchParams
|
||||
>
|
||||
|
||||
@@ -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`,
|
||||
|
||||
@@ -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*",
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user