Remove SecurityPage: it was originally about change password and stuff

This commit is contained in:
Vesa Luusua 2017-10-20 18:24:31 +03:00
parent 089cd298e9
commit 7918250b9c
6 changed files with 0 additions and 97 deletions

View file

@ -79,7 +79,6 @@ describe('Application', () => {
'/account/contact-details': defaultAuthPath,
'/account/change-password': defaultAuthPath,
'/account/payout-preferences': defaultAuthPath,
'/account/security': defaultAuthPath,
'/verify-email': loginPath,
};
forEach(urlRedirects, (redirectPath, url) => {

View file

@ -1,50 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import { compose } from 'redux';
import { connect } from 'react-redux';
import * as propTypes from '../../util/propTypes';
import { isScrollingDisabled } from '../../ducks/UI.duck';
import { Page } from '../../components';
import { TopbarContainer } from '../../containers';
export const SecurityPageComponent = props => {
const { authInfoError, logoutError, scrollingDisabled } = props;
return (
<Page
authInfoError={authInfoError}
logoutError={logoutError}
title="Security"
scrollingDisabled={scrollingDisabled}
>
<TopbarContainer />
</Page>
);
};
SecurityPageComponent.defaultProps = {
authInfoError: null,
logoutError: null,
};
const { bool } = PropTypes;
SecurityPageComponent.propTypes = {
authInfoError: propTypes.error,
logoutError: propTypes.error,
scrollingDisabled: bool.isRequired,
};
const mapStateToProps = state => {
// Page needs authInfoError and logoutError
const { authInfoError, logoutError } = state.Auth;
return {
authInfoError,
logoutError,
scrollingDisabled: isScrollingDisabled(state),
};
};
const SecurityPage = compose(connect(mapStateToProps))(SecurityPageComponent);
export default SecurityPage;

View file

@ -1,26 +0,0 @@
import React from 'react';
import { renderShallow } from '../../util/test-helpers';
import { SecurityPageComponent } from './SecurityPage';
const noop = () => null;
describe('SecurityPage', () => {
it('matches snapshot', () => {
const tree = renderShallow(
<SecurityPageComponent
params={{ displayName: 'my-shop' }}
history={{ push: noop }}
location={{ search: '' }}
scrollingDisabled={false}
authInProgress={false}
currentUserHasListings={false}
isAuthenticated={false}
onLogout={noop}
onManageDisableScrolling={noop}
sendVerificationEmailInProgress={false}
onResendVerificationEmail={noop}
/>
);
expect(tree).toMatchSnapshot();
});
});

View file

@ -1,12 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SecurityPage matches snapshot 1`] = `
<Page
authInfoError={null}
logoutError={null}
scrollingDisabled={false}
title="Security"
>
<withRouter(Connect(TopbarContainerComponent)) />
</Page>
`;

View file

@ -35,7 +35,6 @@ export { default as ProfileSettingsForm } from './ProfileSettingsForm/ProfileSet
export { default as ProfileSettingsPage } from './ProfileSettingsPage/ProfileSettingsPage';
export { default as SalePage } from './SalePage/SalePage';
export { default as SearchPage } from './SearchPage/SearchPage';
export { default as SecurityPage } from './SecurityPage/SecurityPage';
export { default as SignupForm } from './SignupForm/SignupForm';
export { default as StaticPage } from './StaticPage/StaticPage';
export { default as StripePaymentForm } from './StripePaymentForm/StripePaymentForm';

View file

@ -18,7 +18,6 @@ import {
ProfileSettingsPage,
SalePage,
SearchPage,
SecurityPage,
StyleguidePage,
EmailVerificationPage,
} from './containers';
@ -232,12 +231,6 @@ const routeConfiguration = () => {
name: 'PayoutPreferencesPage',
component: props => <PayoutPreferencesPage {...props} />,
},
{
path: '/account/security',
auth: true,
name: 'SecurityPage',
component: props => <SecurityPage {...props} />,
},
{
path: '/styleguide',
name: 'Styleguide',