feat: add commented out prep for path redirects when missing params
This commit is contained in:
@@ -72,6 +72,28 @@ const nextConfig = {
|
||||
|
||||
// https://nextjs.org/docs/app/api-reference/next-config-js/redirects#header-cookie-and-query-matching
|
||||
redirects() {
|
||||
// const rateQueries = [
|
||||
// {
|
||||
// key: "hotel",
|
||||
// type: "query",
|
||||
// value: undefined,
|
||||
// },
|
||||
// {
|
||||
// key: "fromdate",
|
||||
// type: "query",
|
||||
// value: undefined,
|
||||
// },
|
||||
// {
|
||||
// key: "todate",
|
||||
// type: "query",
|
||||
// value: undefined,
|
||||
// },
|
||||
// {
|
||||
// key: "room",
|
||||
// type: "query",
|
||||
// value: undefined,
|
||||
// },
|
||||
// ]
|
||||
const bedTypeQuery = {
|
||||
key: "bedType",
|
||||
type: "query",
|
||||
@@ -82,22 +104,43 @@ const nextConfig = {
|
||||
type: "query",
|
||||
value: undefined,
|
||||
}
|
||||
const detailQueries = [
|
||||
{
|
||||
key: "countryCode",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "email",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "firstname",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "lastname",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "phoneNumber",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
]
|
||||
|
||||
return [
|
||||
// {
|
||||
// ----------------------------------------
|
||||
// Add all required params that should be
|
||||
// added from Select Room
|
||||
// Uncomment when Team Explorer has deployed
|
||||
// the select room submission
|
||||
// ----------------------------------------
|
||||
// source: "/:lang/hotelreservation/:path",
|
||||
// destination: "/:lang",
|
||||
// missing: [
|
||||
// {
|
||||
// key: "hotelId",
|
||||
// type: "query",
|
||||
// value: undefined,
|
||||
// },
|
||||
// ],
|
||||
// source: "/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
|
||||
// destination: "/:lang/hotelreservation/select-rate",
|
||||
// missing: rateQueries,
|
||||
// permanent: false,
|
||||
// },
|
||||
{
|
||||
@@ -133,33 +176,7 @@ const nextConfig = {
|
||||
{
|
||||
source: "/:lang/hotelreservation/payment",
|
||||
destination: "/:lang/hotelreservation/details",
|
||||
missing: [
|
||||
{
|
||||
key: "countryCode",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "email",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "firstname",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "lastname",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
{
|
||||
key: "phoneNumber",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
],
|
||||
missing: detailQueries,
|
||||
permanent: false,
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user