diff --git a/src/containers/InboxPage/InboxPage.js b/src/containers/InboxPage/InboxPage.js index 9d1eeff4..81ec37d2 100644 --- a/src/containers/InboxPage/InboxPage.js +++ b/src/containers/InboxPage/InboxPage.js @@ -25,7 +25,6 @@ import { isScrollingDisabled } from '../../ducks/UI.duck'; import { Avatar, NamedLink, - NamedRedirect, NotificationBadge, Page, PaginationLinks, @@ -37,7 +36,7 @@ import { LayoutWrapperFooter, Footer, } from '../../components'; -import { TopbarContainer } from '../../containers'; +import { TopbarContainer, NotFoundPage } from '../../containers'; import config from '../../config'; import { loadData } from './InboxPage.duck'; @@ -254,7 +253,7 @@ export const InboxPageComponent = props => { const validTab = tab === 'orders' || tab === 'sales'; if (!validTab) { - return ; + return ; } const isOrders = tab === 'orders'; 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 diff --git a/src/containers/ProfilePage/ProfilePage.js b/src/containers/ProfilePage/ProfilePage.js index 134cde77..492db36c 100644 --- a/src/containers/ProfilePage/ProfilePage.js +++ b/src/containers/ProfilePage/ProfilePage.js @@ -24,7 +24,7 @@ import { Reviews, ButtonTabNavHorizontal, } from '../../components'; -import { TopbarContainer } from '../../containers'; +import { TopbarContainer, NotFoundPage } from '../../containers'; import { loadData } from './ProfilePage.duck'; import config from '../../config'; @@ -210,7 +210,9 @@ export class ProfilePageComponent extends Component { let content; - if (userShowError || queryListingsError) { + if (userShowError && userShowError.status === 404) { + return ; + } else if (userShowError || queryListingsError) { content = (

diff --git a/src/util/types.js b/src/util/types.js index 81855bdb..c512b15d 100644 --- a/src/util/types.js +++ b/src/util/types.js @@ -392,6 +392,8 @@ export const ERROR_CODE_EMAIL_NOT_VERIFIED = 'email-unverified'; export const ERROR_CODE_TOO_MANY_VERIFICATION_REQUESTS = 'email-too-many-verification-requests'; export const ERROR_CODE_UPLOAD_OVER_LIMIT = 'request-upload-over-limit'; export const ERROR_CODE_VALIDATION_INVALID_PARAMS = 'validation-invalid-params'; +export const ERROR_CODE_NOT_FOUND = 'not-found'; + const ERROR_CODES = [ ERROR_CODE_TRANSACTION_LISTING_NOT_FOUND, ERROR_CODE_TRANSACTION_INVALID_TRANSITION, @@ -404,6 +406,7 @@ const ERROR_CODES = [ ERROR_CODE_TOO_MANY_VERIFICATION_REQUESTS, ERROR_CODE_UPLOAD_OVER_LIMIT, ERROR_CODE_VALIDATION_INVALID_PARAMS, + ERROR_CODE_NOT_FOUND, ]; // API error