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 { getPublicNextURL } from "@/server/utils"
|
||||
|
||||
import type { MiddlewareMatcher } from "@/types/middleware"
|
||||
|
||||
export const middleware: NextMiddleware = (request) => {
|
||||
const url = request.nextUrl.clone()
|
||||
const url = new URL(request.nextUrl, getPublicNextURL(request))
|
||||
const { searchParams } = url
|
||||
|
||||
let modified = false
|
||||
|
||||
@@ -13,6 +13,7 @@ import { toApiLang } from "@/server/utils"
|
||||
import { generateChildrenString } from "@/components/HotelReservation/utils"
|
||||
import { getCacheClient } from "@/services/dataCache"
|
||||
import { cache } from "@/utils/cache"
|
||||
import { chunk } from "@/utils/chunk"
|
||||
import { sortRoomConfigs } from "@/utils/sort"
|
||||
|
||||
import { getHotelPageUrls } from "../contentstack/hotelPage/utils"
|
||||
@@ -31,6 +32,8 @@ import {
|
||||
roomsAvailabilitySchema,
|
||||
} from "./output"
|
||||
|
||||
import type { z } from "zod"
|
||||
|
||||
import type { BedTypeSelection } from "@/types/components/hotelReservation/enterDetails/bedType"
|
||||
import { AvailabilityEnum } from "@/types/components/hotelReservation/selectHotel/selectHotel"
|
||||
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||
@@ -61,8 +64,6 @@ import type {
|
||||
RoomConfiguration,
|
||||
} from "@/types/trpc/routers/hotel/roomAvailability"
|
||||
import type { Endpoint } from "@/lib/api/endpoints"
|
||||
import { chunk } from "@/utils/chunk"
|
||||
import { z } from "zod"
|
||||
|
||||
export function getPoiGroupByCategoryName(category: string | undefined) {
|
||||
if (!category) return PointOfInterestGroupEnum.LOCATION
|
||||
|
||||
Reference in New Issue
Block a user