feat: make steps of enter details flow dynamic depending on data
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { bookingFlow } from "@/constants/routes/hotelReservation"
|
||||
|
||||
import { getDefaultRequestHeaders } from "./utils"
|
||||
|
||||
import type { NextMiddleware } from "next/server"
|
||||
@@ -18,5 +16,7 @@ export const middleware: NextMiddleware = async (request) => {
|
||||
}
|
||||
|
||||
export const matcher: MiddlewareMatcher = (request) => {
|
||||
return bookingFlow.includes(request.nextUrl.pathname)
|
||||
return !!request.nextUrl.pathname.match(
|
||||
/^\/(da|de|en|fi|no|sv)\/(hotelreservation)/
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user