Merged in fix/redirect-service-revert (pull request #1818)
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
This commit is contained in:
@@ -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<LangParams & ContentTypeParams & UIDParams> & {
|
||||
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 (
|
||||
<div className={styles.container}>
|
||||
<section className={styles.layout}>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user