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.
This commit is contained in:
Kimmo Puputti 2018-02-09 10:20:21 +02:00
parent 84f6bde9f3
commit f9e2f45a01

View file

@ -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 <NamedRedirect name="NotFoundPage" />;
return <NotFoundPage />;
} else if (showListingError) {
// Other error in fetching listing