feat: make steps of enter details flow dynamic depending on data

This commit is contained in:
Simon Emanuelsson
2024-11-18 09:13:23 +01:00
committed by Joakim Jäderberg
parent d49e301634
commit c6fc500d9e
62 changed files with 959 additions and 659 deletions

View File

@@ -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)/
)
}