Skip to content

Commit

Permalink
Ikke redirect om noRedirect er satt
Browse files Browse the repository at this point in the history
  • Loading branch information
talepre committed Feb 25, 2025
1 parent cd82de2 commit 36d2da9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/pages/calculator-page/CalculatorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { usePageContentProps } from 'store/pageContext';
import style from './CalculatorPage.module.scss';

export const CalculatorPage = (props: CalculatorProps) => {
const { editorView } = usePageContentProps();
const { editorView, noRedirect } = usePageContentProps();

if (!editorView) {
if (!editorView && !noRedirect) {
return <RedirectTo404 />;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const displayConfig = {
};

export const FormDetailsPreviewPage = (props: FormDetailsPageProps) => {
const { data, editorView } = props;
const { data, editorView, noRedirect } = props;

if (!editorView) {
if (!editorView && !noRedirect) {
return <RedirectTo404 />;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ProductDetailsProps } from 'types/content-props/dynamic-page-props';
import { RedirectTo404 } from 'components/_common/redirect-to-404/RedirectTo404';

export const ProductDetailsPage = (props: ProductDetailsProps) => {
if (!props.editorView) {
if (!props.editorView && !props.noRedirect) {
return <RedirectTo404 />;
}

Expand Down

0 comments on commit 36d2da9

Please sign in to comment.