From 2648b1774488780728cfb6de635a9c161c713df6 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Wed, 16 Apr 2025 10:09:54 +0000 Subject: [PATCH] Merged in fix/redirect-service-revert (pull request #1818) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hotfix: uncomment new stuff that broke destination page * hotfix: uncomment new stuff that broke destination page Approved-by: Michael Zetterberg Approved-by: Joakim Jäderberg --- .../(live)/(public)/[contentType]/[uid]/layout.tsx | 11 ++++------- apps/scandic-web/middleware.ts | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.tsx index d7ec5ef65..3c0681cc7 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.tsx @@ -1,5 +1,3 @@ -import { notFound } from "next/navigation" - import styles from "./layout.module.css" import type { @@ -8,13 +6,12 @@ import type { LayoutArgs, UIDParams, } from "@/types/params" -import { PageContentTypeEnum } from "@/types/requests/contentType" export default function ContentTypeLayout({ breadcrumbs, preview, children, - params, + //params, }: React.PropsWithChildren< LayoutArgs & { breadcrumbs: React.ReactNode @@ -23,9 +20,9 @@ export default function ContentTypeLayout({ >) { // Would like a better way to check if the contentType is valid. // Perhaps a case for using an `{} as const` object for PageContentTypes instead? - if (!Object.values(PageContentTypeEnum).includes(params.contentType)) { - notFound() - } + // if (!Object.values(PageContentTypeEnum).includes(params.contentType)) { + // notFound() + // } return (
diff --git a/apps/scandic-web/middleware.ts b/apps/scandic-web/middleware.ts index e83007c18..1a66b9b53 100644 --- a/apps/scandic-web/middleware.ts +++ b/apps/scandic-web/middleware.ts @@ -12,7 +12,6 @@ import * as currentWebLogout from "@/middlewares/currentWebLogout" import * as dateFormat from "@/middlewares/dateFormat" import * as handleAuth from "@/middlewares/handleAuth" import * as myPages from "@/middlewares/myPages" -import * as redirect from "@/middlewares/redirect" import * as sasXScandic from "@/middlewares/sasXScandic" import { getDefaultRequestHeaders } from "@/middlewares/utils" import * as webView from "@/middlewares/webView" @@ -59,7 +58,7 @@ export const middleware: NextMiddleware = async (request, event) => { bookingFlow, sasXScandic, cmsContent, - redirect, + //redirect, ] try {