EditListingPage: import routeConfiguration and remove context.flattenedRoutes

This commit is contained in:
Vesa Luusua 2017-10-10 20:15:14 +03:00
parent f1682b9021
commit a1e8917b1c
3 changed files with 1 additions and 6 deletions

View file

@ -59,7 +59,6 @@ export const EditListingPageComponent = props => {
currentUserHasOrders, currentUserHasOrders,
createStripeAccountError, createStripeAccountError,
fetchInProgress, fetchInProgress,
flattenedRoutes,
getListing, getListing,
history, history,
intl, intl,
@ -168,7 +167,6 @@ export const EditListingPageComponent = props => {
errors={errors} errors={errors}
fetchInProgress={fetchInProgress} fetchInProgress={fetchInProgress}
newListingCreated={newListingCreated} newListingCreated={newListingCreated}
flattenedRoutes={flattenedRoutes}
history={history} history={history}
images={images} images={images}
listing={isNew ? page.listingDraft : currentListing} listing={isNew ? page.listingDraft : currentListing}
@ -211,7 +209,7 @@ EditListingPageComponent.defaultProps = {
sendVerificationEmailError: null, sendVerificationEmailError: null,
}; };
const { arrayOf, bool, func, instanceOf, number, object, shape, string, oneOf } = PropTypes; const { bool, func, instanceOf, number, object, shape, string, oneOf } = PropTypes;
EditListingPageComponent.propTypes = { EditListingPageComponent.propTypes = {
authInfoError: instanceOf(Error), authInfoError: instanceOf(Error),
@ -221,7 +219,6 @@ EditListingPageComponent.propTypes = {
currentUserHasListings: bool.isRequired, currentUserHasListings: bool.isRequired,
currentUserHasOrders: bool, currentUserHasOrders: bool,
fetchInProgress: bool.isRequired, fetchInProgress: bool.isRequired,
flattenedRoutes: arrayOf(propTypes.route).isRequired,
getListing: func.isRequired, getListing: func.isRequired,
isAuthenticated: bool.isRequired, isAuthenticated: bool.isRequired,
logoutError: instanceOf(Error), logoutError: instanceOf(Error),

View file

@ -15,7 +15,6 @@ describe('EditListingPageComponent', () => {
isAuthenticated={false} isAuthenticated={false}
authInProgress={false} authInProgress={false}
fetchInProgress={false} fetchInProgress={false}
flattenedRoutes={[]}
location={{ search: '' }} location={{ search: '' }}
history={{ push: noop }} history={{ push: noop }}
getListing={getListing} getListing={getListing}

View file

@ -38,7 +38,6 @@ exports[`EditListingPageComponent matches snapshot 1`] = `
} }
} }
fetchInProgress={false} fetchInProgress={false}
flattenedRoutes={Array []}
history={ history={
Object { Object {
"push": [Function], "push": [Function],