feat(SW-70): create base for rate selection page
This is the foundation for the rate selection. Since we don't have UX and UI ready yet this is on a best effort basis. Things that will be changed later includes proper API fetching, correct design, internationalization of text and form handling.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { bookingFlow } from "@/constants/routes/hotelReservation"
|
||||
import { hotelReservation } from "@/constants/routes/hotelReservation"
|
||||
|
||||
import { findLang } from "@/utils/languages"
|
||||
|
||||
import type { NextMiddleware } from "next/server"
|
||||
|
||||
@@ -11,5 +13,6 @@ export const middleware: NextMiddleware = () => {
|
||||
}
|
||||
|
||||
export const matcher: MiddlewareMatcher = (request) => {
|
||||
return bookingFlow.includes(request.nextUrl.pathname)
|
||||
const lang = findLang(request.nextUrl.pathname)!
|
||||
return request.nextUrl.pathname.startsWith(hotelReservation[lang])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user