mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Merge pull request #699 from sharetribe/page-internal-notfound
Page specific not found handling
This commit is contained in:
commit
1b0517ee6c
4 changed files with 11 additions and 8 deletions
|
|
@ -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 <NamedRedirect name="NotFoundPage" />;
|
||||
return <NotFoundPage />;
|
||||
}
|
||||
|
||||
const isOrders = tab === 'orders';
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <NotFoundPage />;
|
||||
} else if (userShowError || queryListingsError) {
|
||||
content = (
|
||||
<p className={css.error}>
|
||||
<FormattedMessage id="ProfilePage.loadingDataFailed" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue