From f9e2f45a01b7eda9a6aba5ce539bb1a9af388657 Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Fri, 9 Feb 2018 10:20:21 +0200 Subject: [PATCH] Fix listing page 404 Render NotFoundPage instead of redirect. This fixes the case when an old error resulted in a redirect for new listing page request. It is also better to keep the URL so it can be fixed to the correct one. --- src/containers/ListingPage/ListingPage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js index 9c226d64..fa4c6ac9 100644 --- a/src/containers/ListingPage/ListingPage.js +++ b/src/containers/ListingPage/ListingPage.js @@ -24,7 +24,6 @@ import { Page, ResponsiveImage, NamedLink, - NamedRedirect, Modal, ImageCarousel, InlineTextButton, @@ -37,7 +36,7 @@ import { Reviews, PropertyGroup, } from '../../components'; -import { BookingDatesForm, TopbarContainer, EnquiryForm } from '../../containers'; +import { BookingDatesForm, TopbarContainer, EnquiryForm, NotFoundPage } from '../../containers'; import { sendEnquiry, loadData, setInitialValues } from './ListingPage.duck'; import EditIcon from './EditIcon'; @@ -292,7 +291,7 @@ export class ListingPageComponent extends Component { if (showListingError && showListingError.status === 404) { // 404 listing not found - return ; + return ; } else if (showListingError) { // Other error in fetching listing