feat(SW-467): add routing for details steps

This commit is contained in:
Christel Westerberg
2024-10-03 11:39:35 +02:00
parent 00ad62d3a1
commit 1bb2d3f687
5 changed files with 148 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import { NextResponse } from "next/server"
import { hotelReservation } from "@/constants/routes/hotelReservation"
import { bookingFlow } from "@/constants/routes/hotelReservation"
import { resolve as resolveEntry } from "@/utils/entry"
import { findLang } from "@/utils/languages"
@@ -35,6 +35,5 @@ export const middleware: NextMiddleware = async (request) => {
}
export const matcher: MiddlewareMatcher = (request) => {
const lang = findLang(request.nextUrl.pathname)!
return request.nextUrl.pathname.startsWith(hotelReservation[lang])
return bookingFlow.includes(request.nextUrl.pathname)
}