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}>
|
||||
|
||||
Reference in New Issue
Block a user