Skip to content

Commit 36d2da9

Browse files
committed
Ikke redirect om noRedirect er satt
1 parent cd82de2 commit 36d2da9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/pages/calculator-page/CalculatorPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { usePageContentProps } from 'store/pageContext';
99
import style from './CalculatorPage.module.scss';
1010

1111
export const CalculatorPage = (props: CalculatorProps) => {
12-
const { editorView } = usePageContentProps();
12+
const { editorView, noRedirect } = usePageContentProps();
1313

14-
if (!editorView) {
14+
if (!editorView && !noRedirect) {
1515
return <RedirectTo404 />;
1616
}
1717

src/components/pages/form-details-preview-page/FormDetailsPreviewPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const displayConfig = {
1313
};
1414

1515
export const FormDetailsPreviewPage = (props: FormDetailsPageProps) => {
16-
const { data, editorView } = props;
16+
const { data, editorView, noRedirect } = props;
1717

18-
if (!editorView) {
18+
if (!editorView && !noRedirect) {
1919
return <RedirectTo404 />;
2020
}
2121

src/components/pages/product-details-page/ProductDetailsPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ProductDetailsProps } from 'types/content-props/dynamic-page-props';
44
import { RedirectTo404 } from 'components/_common/redirect-to-404/RedirectTo404';
55

66
export const ProductDetailsPage = (props: ProductDetailsProps) => {
7-
if (!props.editorView) {
7+
if (!props.editorView && !props.noRedirect) {
88
return <RedirectTo404 />;
99
}
1010

0 commit comments

Comments
 (0)