mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
EditListingPage renamed to ProfileSettingsPage
This commit is contained in:
parent
d61884b1cd
commit
0ca26678f8
6 changed files with 22 additions and 26 deletions
|
|
@ -67,7 +67,7 @@ describe('Application', () => {
|
|||
'/l/new': defaultAuthPath,
|
||||
'/l/listing-title-slug/1234/new/description': defaultAuthPath,
|
||||
'/l/listing-title-slug/1234/checkout': defaultAuthPath,
|
||||
'/u/1234/edit': defaultAuthPath,
|
||||
'/profile-settings': defaultAuthPath,
|
||||
'/inbox': defaultAuthPath,
|
||||
'/inbox/orders': defaultAuthPath,
|
||||
'/inbox/sales': defaultAuthPath,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { logout, authenticationInProgress } from '../../ducks/Auth.duck';
|
|||
import { manageDisableScrolling, isScrollingDisabled } from '../../ducks/UI.duck';
|
||||
import { PageLayout, Topbar } from '../../components';
|
||||
|
||||
export const EditProfilePageComponent = props => {
|
||||
export const ProfileSettingsPageComponent = props => {
|
||||
const {
|
||||
authInfoError,
|
||||
authInProgress,
|
||||
|
|
@ -20,14 +20,13 @@ export const EditProfilePageComponent = props => {
|
|||
notificationCount,
|
||||
onLogout,
|
||||
onManageDisableScrolling,
|
||||
params,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<PageLayout
|
||||
authInfoError={authInfoError}
|
||||
logoutError={logoutError}
|
||||
title={`Edit profile page with display name: ${params.displayName}`}
|
||||
title="Profile settings"
|
||||
>
|
||||
<Topbar
|
||||
authInProgress={authInProgress}
|
||||
|
|
@ -44,16 +43,16 @@ export const EditProfilePageComponent = props => {
|
|||
);
|
||||
};
|
||||
|
||||
EditProfilePageComponent.defaultProps = {
|
||||
ProfileSettingsPageComponent.defaultProps = {
|
||||
authInfoError: null,
|
||||
currentUser: null,
|
||||
logoutError: null,
|
||||
notificationCount: 0,
|
||||
};
|
||||
|
||||
const { bool, func, instanceOf, number, object, shape, string } = PropTypes;
|
||||
const { bool, func, instanceOf, number, object, shape } = PropTypes;
|
||||
|
||||
EditProfilePageComponent.propTypes = {
|
||||
ProfileSettingsPageComponent.propTypes = {
|
||||
authInfoError: instanceOf(Error),
|
||||
authInProgress: bool.isRequired,
|
||||
currentUser: propTypes.currentUser,
|
||||
|
|
@ -63,7 +62,6 @@ EditProfilePageComponent.propTypes = {
|
|||
notificationCount: number,
|
||||
onLogout: func.isRequired,
|
||||
onManageDisableScrolling: func.isRequired,
|
||||
params: shape({ displayName: string.isRequired }).isRequired,
|
||||
|
||||
// from withRouter
|
||||
history: shape({
|
||||
|
|
@ -99,8 +97,8 @@ const mapDispatchToProps = dispatch => ({
|
|||
dispatch(manageDisableScrolling(componentId, disableScrolling)),
|
||||
});
|
||||
|
||||
const EditProfilePage = compose(connect(mapStateToProps, mapDispatchToProps), withRouter)(
|
||||
EditProfilePageComponent
|
||||
const ProfileSettingsPage = compose(connect(mapStateToProps, mapDispatchToProps), withRouter)(
|
||||
ProfileSettingsPageComponent
|
||||
);
|
||||
|
||||
export default EditProfilePage;
|
||||
export default ProfileSettingsPage;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
import React from 'react';
|
||||
import { renderShallow } from '../../util/test-helpers';
|
||||
import { EditProfilePageComponent } from './EditProfilePage';
|
||||
import { ProfileSettingsPageComponent } from './ProfileSettingsPage';
|
||||
|
||||
const noop = () => null;
|
||||
|
||||
describe('ContactDetailsPage', () => {
|
||||
it('matches snapshot', () => {
|
||||
const tree = renderShallow(
|
||||
<EditProfilePageComponent
|
||||
<ProfileSettingsPageComponent
|
||||
params={{ displayName: 'my-shop' }}
|
||||
history={{ push: noop }}
|
||||
location={{ search: '' }}
|
||||
|
|
@ -2,7 +2,7 @@ exports[`ContactDetailsPage matches snapshot 1`] = `
|
|||
<withRouter(PageLayout)
|
||||
authInfoError={null}
|
||||
logoutError={null}
|
||||
title="Edit profile page with display name: my-shop">
|
||||
title="Profile settings">
|
||||
<Topbar
|
||||
authInProgress={false}
|
||||
currentUser={null}
|
||||
|
|
@ -9,7 +9,6 @@ import EditListingLocationForm from './EditListingLocationForm/EditListingLocati
|
|||
import EditListingPage from './EditListingPage/EditListingPage';
|
||||
import EditListingPhotosForm from './EditListingPhotosForm/EditListingPhotosForm';
|
||||
import EditListingPricingForm from './EditListingPricingForm/EditListingPricingForm';
|
||||
import EditProfilePage from './EditProfilePage/EditProfilePage';
|
||||
import EmailVerificationPage from './EmailVerificationPage/EmailVerificationPage';
|
||||
import EmailVerificationForm from './EmailVerificationForm/EmailVerificationForm';
|
||||
import InboxPage from './InboxPage/InboxPage';
|
||||
|
|
@ -26,6 +25,7 @@ import PasswordForgottenPage from './PasswordForgottenPage/PasswordForgottenPage
|
|||
import PayoutDetailsForm from './PayoutDetailsForm/PayoutDetailsForm';
|
||||
import PayoutPreferencesPage from './PayoutPreferencesPage/PayoutPreferencesPage';
|
||||
import ProfilePage from './ProfilePage/ProfilePage';
|
||||
import ProfileSettingsPage from './ProfileSettingsPage/ProfileSettingsPage';
|
||||
import SalePage from './SalePage/SalePage';
|
||||
import SearchPage from './SearchPage/SearchPage';
|
||||
import SecurityPage from './SecurityPage/SecurityPage';
|
||||
|
|
@ -46,7 +46,6 @@ export {
|
|||
EditListingPage,
|
||||
EditListingPhotosForm,
|
||||
EditListingPricingForm,
|
||||
EditProfilePage,
|
||||
EmailVerificationPage,
|
||||
EmailVerificationForm,
|
||||
InboxPage,
|
||||
|
|
@ -63,6 +62,7 @@ export {
|
|||
PayoutDetailsForm,
|
||||
PayoutPreferencesPage,
|
||||
ProfilePage,
|
||||
ProfileSettingsPage,
|
||||
SalePage,
|
||||
SearchPage,
|
||||
SecurityPage,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import {
|
|||
CheckoutPage,
|
||||
ContactDetailsPage,
|
||||
EditListingPage,
|
||||
EditProfilePage,
|
||||
InboxPage,
|
||||
LandingPage,
|
||||
ListingPage,
|
||||
|
|
@ -16,6 +15,7 @@ import {
|
|||
PasswordForgottenPage,
|
||||
PayoutPreferencesPage,
|
||||
ProfilePage,
|
||||
ProfileSettingsPage,
|
||||
SalePage,
|
||||
SearchPage,
|
||||
SecurityPage,
|
||||
|
|
@ -122,18 +122,16 @@ const routesConfiguration = [
|
|||
exact: true,
|
||||
name: 'ProfilePage',
|
||||
component: props => <ProfilePage {...props} />,
|
||||
routes: [
|
||||
{
|
||||
path: '/u/:displayName/edit',
|
||||
auth: true,
|
||||
exact: true,
|
||||
name: 'EditProfilePage',
|
||||
component: props => <EditProfilePage {...props} />,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/profile-settings',
|
||||
auth: true,
|
||||
exact: true,
|
||||
name: 'ProfileSettingsPage',
|
||||
component: props => <ProfileSettingsPage {...props} />,
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
exact: true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue