Merged in fix/date-query-params (pull request #2214)
Fix/date query params * fix: date query params lowercase redirect middleware * fix: date query params lowercase redirect middleware * Merge branch 'master' into fix/date-query-params
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
import { type NextMiddleware, NextResponse } from "next/server"
|
import { type NextMiddleware, NextResponse } from "next/server"
|
||||||
|
|
||||||
|
import { getPublicNextURL } from "@/server/utils"
|
||||||
|
|
||||||
import type { MiddlewareMatcher } from "@/types/middleware"
|
import type { MiddlewareMatcher } from "@/types/middleware"
|
||||||
|
|
||||||
export const middleware: NextMiddleware = (request) => {
|
export const middleware: NextMiddleware = (request) => {
|
||||||
const url = request.nextUrl.clone()
|
const url = new URL(request.nextUrl, getPublicNextURL(request))
|
||||||
const { searchParams } = url
|
const { searchParams } = url
|
||||||
|
|
||||||
let modified = false
|
let modified = false
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { toApiLang } from "@/server/utils"
|
|||||||
import { generateChildrenString } from "@/components/HotelReservation/utils"
|
import { generateChildrenString } from "@/components/HotelReservation/utils"
|
||||||
import { getCacheClient } from "@/services/dataCache"
|
import { getCacheClient } from "@/services/dataCache"
|
||||||
import { cache } from "@/utils/cache"
|
import { cache } from "@/utils/cache"
|
||||||
|
import { chunk } from "@/utils/chunk"
|
||||||
import { sortRoomConfigs } from "@/utils/sort"
|
import { sortRoomConfigs } from "@/utils/sort"
|
||||||
|
|
||||||
import { getHotelPageUrls } from "../contentstack/hotelPage/utils"
|
import { getHotelPageUrls } from "../contentstack/hotelPage/utils"
|
||||||
@@ -31,6 +32,8 @@ import {
|
|||||||
roomsAvailabilitySchema,
|
roomsAvailabilitySchema,
|
||||||
} from "./output"
|
} from "./output"
|
||||||
|
|
||||||
|
import type { z } from "zod"
|
||||||
|
|
||||||
import type { BedTypeSelection } from "@/types/components/hotelReservation/enterDetails/bedType"
|
import type { BedTypeSelection } from "@/types/components/hotelReservation/enterDetails/bedType"
|
||||||
import { AvailabilityEnum } from "@/types/components/hotelReservation/selectHotel/selectHotel"
|
import { AvailabilityEnum } from "@/types/components/hotelReservation/selectHotel/selectHotel"
|
||||||
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||||
@@ -61,8 +64,6 @@ import type {
|
|||||||
RoomConfiguration,
|
RoomConfiguration,
|
||||||
} from "@/types/trpc/routers/hotel/roomAvailability"
|
} from "@/types/trpc/routers/hotel/roomAvailability"
|
||||||
import type { Endpoint } from "@/lib/api/endpoints"
|
import type { Endpoint } from "@/lib/api/endpoints"
|
||||||
import { chunk } from "@/utils/chunk"
|
|
||||||
import { z } from "zod"
|
|
||||||
|
|
||||||
export function getPoiGroupByCategoryName(category: string | undefined) {
|
export function getPoiGroupByCategoryName(category: string | undefined) {
|
||||||
if (!category) return PointOfInterestGroupEnum.LOCATION
|
if (!category) return PointOfInterestGroupEnum.LOCATION
|
||||||
|
|||||||
Reference in New Issue
Block a user