diff --git a/src/components/Page/Page.js b/src/components/Page/Page.js
deleted file mode 100644
index 6be3286f..00000000
--- a/src/components/Page/Page.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import React, { PropTypes } from 'react';
-import Helmet from 'react-helmet';
-import { Topbar } from '../../containers';
-
-const Page = props => {
- const { className, title, children } = props;
- return (
-
-
-
-
{title}
- {children}
-
- );
-};
-
-const { string, any } = PropTypes;
-
-Page.defaultProps = { className: '', children: null };
-
-Page.propTypes = { className: string, title: string.isRequired, children: any };
-
-export default Page;
diff --git a/src/components/PageLayout/PageLayout.js b/src/components/PageLayout/PageLayout.js
new file mode 100644
index 00000000..d3ba63a6
--- /dev/null
+++ b/src/components/PageLayout/PageLayout.js
@@ -0,0 +1,42 @@
+import React, { Component, PropTypes } from 'react';
+import Helmet from 'react-helmet';
+import { Topbar } from '../../containers';
+
+const scrollToTop = () => {
+ // Todo: this might need fine tuning later
+ window.scrollTo(0, 0);
+}
+
+class PageLayout extends Component {
+
+ componentDidMount() {
+ this.historyUnlisten = this.context.history.listen(() => scrollToTop());
+ }
+
+ componentWillUnmount() {
+ this.historyUnlisten();
+ }
+
+
+ render() {
+ const { className, title, children } = this.props;
+ return (
+
+
+
+
{title}
+ {children}
+
+ );
+ }
+}
+
+PageLayout.contextTypes = { history: React.PropTypes.object };
+
+PageLayout.defaultProps = { className: '', children: null };
+
+const { string, any } = PropTypes;
+
+Page.propTypes = { className: string, title: string.isRequired, children: any };
+
+export default Page;
diff --git a/src/components/index.js b/src/components/index.js
index 151ee0f4..3c747810 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -1,4 +1,4 @@
/* eslint-disable import/prefer-default-export */
-import Page from './Page/Page';
+import PageLayout from './PageLayout/PageLayout';
-export { Page };
+export { PageLayout };
diff --git a/src/containers/AuthenticationPage/AuthenticationPage.js b/src/containers/AuthenticationPage/AuthenticationPage.js
index 648a4b42..76eac332 100644
--- a/src/containers/AuthenticationPage/AuthenticationPage.js
+++ b/src/containers/AuthenticationPage/AuthenticationPage.js
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import { Link, Redirect } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
import { fakeAuth } from '../../Routes';
class AuthenticationPage extends Component {
@@ -30,30 +30,28 @@ class AuthenticationPage extends Component {
const alternativeMethod = this.props.tab === 'login' ? toSignup : toLogin;
const currentMethod = this.props.tab === 'login' ? 'Log in' : 'Sign up';
- const fromLoginMsg = from ? (
-
- You must log in to view the page at
- {from.pathname}
-
- ) : null;
+ const fromLoginMsg = from ?
+ You must log in to view the page at
+ {from.pathname}
+
: null;
return (
-
+
{redirectToReferrer ? : null}
{fromLoginMsg}
{currentMethod}
or {alternativeMethod}
-
+
);
}
}
AuthenticationPage.defaultProps = { location: {}, tab: 'signup' };
-const { shape, string, oneOf } = PropTypes;
+const { shape, string, object, oneOf, oneOfType } = PropTypes;
AuthenticationPage.propTypes = {
- location: shape({ state: shape({ from: string }) }),
+ location: shape({ state: shape({ from: oneOfType([object, string]) }) }),
tab: oneOf([ 'login', 'signup' ]),
};
diff --git a/src/containers/AuthenticationPage/AuthenticationPage.test.js b/src/containers/AuthenticationPage/AuthenticationPage.test.js
index c6fc46de..c6885d77 100644
--- a/src/containers/AuthenticationPage/AuthenticationPage.test.js
+++ b/src/containers/AuthenticationPage/AuthenticationPage.test.js
@@ -6,11 +6,9 @@ import AuthenticationPage from './AuthenticationPage';
describe('AuthenticationPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/CheckoutPage/CheckoutPage.js b/src/containers/CheckoutPage/CheckoutPage.js
index c4aac069..9f2f1a3d 100644
--- a/src/containers/CheckoutPage/CheckoutPage.js
+++ b/src/containers/CheckoutPage/CheckoutPage.js
@@ -1,11 +1,11 @@
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const CheckoutPage = ({ params }) => (
-
+
Pay
-
+
);
const { shape, string } = PropTypes;
diff --git a/src/containers/CheckoutPage/CheckoutPage.test.js b/src/containers/CheckoutPage/CheckoutPage.test.js
index 14834f2f..0887a31a 100644
--- a/src/containers/CheckoutPage/CheckoutPage.test.js
+++ b/src/containers/CheckoutPage/CheckoutPage.test.js
@@ -6,11 +6,9 @@ import CheckoutPage from './CheckoutPage';
describe('CheckoutPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/ContactDetailsPage/ContactDetailsPage.js b/src/containers/ContactDetailsPage/ContactDetailsPage.js
index c66b62af..c96ad26b 100644
--- a/src/containers/ContactDetailsPage/ContactDetailsPage.js
+++ b/src/containers/ContactDetailsPage/ContactDetailsPage.js
@@ -1,4 +1,4 @@
import React from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
-export default () =>
+export default () => ;
diff --git a/src/containers/ContactDetailsPage/ContactDetailsPage.test.js b/src/containers/ContactDetailsPage/ContactDetailsPage.test.js
index ae0d096c..31207dc4 100644
--- a/src/containers/ContactDetailsPage/ContactDetailsPage.test.js
+++ b/src/containers/ContactDetailsPage/ContactDetailsPage.test.js
@@ -6,11 +6,9 @@ import ContactDetailsPage from './ContactDetailsPage';
describe('ContactDetailsPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/ConversationPage/ConversationPage.js b/src/containers/ConversationPage/ConversationPage.js
index 8803ef02..5365123a 100644
--- a/src/containers/ConversationPage/ConversationPage.js
+++ b/src/containers/ConversationPage/ConversationPage.js
@@ -1,12 +1,12 @@
import React, { PropTypes } from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const ConversationPage = props => {
const { params } = props;
return (
-
+
Conversation id: {params.id}
-
+
);
};
diff --git a/src/containers/ConversationPage/ConversationPage.test.js b/src/containers/ConversationPage/ConversationPage.test.js
index 3d9af4af..eef04a4c 100644
--- a/src/containers/ConversationPage/ConversationPage.test.js
+++ b/src/containers/ConversationPage/ConversationPage.test.js
@@ -6,11 +6,9 @@ import ConversationPage from './ConversationPage';
describe('ConversationPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/EditProfilePage/EditProfilePage.js b/src/containers/EditProfilePage/EditProfilePage.js
index d92cbe7c..99a1da1c 100644
--- a/src/containers/EditProfilePage/EditProfilePage.js
+++ b/src/containers/EditProfilePage/EditProfilePage.js
@@ -1,9 +1,9 @@
import React, { PropTypes } from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const EditProfilePage = props => {
const { params } = props;
- return ;
+ return ;
};
const { shape, string } = PropTypes;
diff --git a/src/containers/EditProfilePage/EditProfilePage.test.js b/src/containers/EditProfilePage/EditProfilePage.test.js
index ef5c30ba..98a22b7e 100644
--- a/src/containers/EditProfilePage/EditProfilePage.test.js
+++ b/src/containers/EditProfilePage/EditProfilePage.test.js
@@ -6,11 +6,9 @@ import EditProfilePage from './EditProfilePage';
describe('EditProfilePage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/InboxPage/InboxPage.js b/src/containers/InboxPage/InboxPage.js
index f94605a9..01035ee9 100644
--- a/src/containers/InboxPage/InboxPage.js
+++ b/src/containers/InboxPage/InboxPage.js
@@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const toPath = (filter, id) => {
switch (filter) {
@@ -16,11 +16,11 @@ const toPath = (filter, id) => {
const InboxPage = props => {
const { filter } = props;
return (
-
+
-
+
);
};
@@ -28,6 +28,6 @@ InboxPage.defaultProps = { filter: 'conversation' };
const { oneOf } = PropTypes;
-InboxPage.propTypes = { filter: oneOf([ 'orders', 'sales', 'conversation' ]) };
+InboxPage.propTypes = { filter: oneOf([ 'orders', 'sales', 'inbox' ]) };
export default InboxPage;
diff --git a/src/containers/InboxPage/InboxPage.test.js b/src/containers/InboxPage/InboxPage.test.js
index 7076f86e..cd8eb048 100644
--- a/src/containers/InboxPage/InboxPage.test.js
+++ b/src/containers/InboxPage/InboxPage.test.js
@@ -8,7 +8,7 @@ describe('InboxPage', () => {
const component = renderer.create(
(
-
+
),
);
diff --git a/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap b/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap
index 3c315f29..41351df5 100644
--- a/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap
+++ b/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap
@@ -135,7 +135,7 @@ exports[`InboxPage matches snapshot 1`] = `
- conversation page
+ inbox page
diff --git a/src/containers/LandingPage/LandingPage.js b/src/containers/LandingPage/LandingPage.js
index 2c0b297a..db448beb 100644
--- a/src/containers/LandingPage/LandingPage.js
+++ b/src/containers/LandingPage/LandingPage.js
@@ -1,9 +1,9 @@
import React from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
export default () => (
-
+
Find studios
-
-)
+
+);
diff --git a/src/containers/LandingPage/LandingPage.test.js b/src/containers/LandingPage/LandingPage.test.js
index bce166df..87a4dd78 100644
--- a/src/containers/LandingPage/LandingPage.test.js
+++ b/src/containers/LandingPage/LandingPage.test.js
@@ -6,11 +6,9 @@ import LandingPage from './LandingPage';
describe('LandingPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js
index 31e10d6f..c0ab09e8 100644
--- a/src/containers/ListingPage/ListingPage.js
+++ b/src/containers/ListingPage/ListingPage.js
@@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const ListingPage = ({ params }) => {
// Listing id should be located either in the end of slug
@@ -11,10 +11,10 @@ const ListingPage = ({ params }) => {
// TODO: Fetch data from SDK if no data is passed through props
return (
-
+
Slug: {params.slug}
Book
-
+
);
};
diff --git a/src/containers/ListingPage/ListingPage.test.js b/src/containers/ListingPage/ListingPage.test.js
index 7b427688..2eebda01 100644
--- a/src/containers/ListingPage/ListingPage.test.js
+++ b/src/containers/ListingPage/ListingPage.test.js
@@ -6,11 +6,9 @@ import ListingPage from './ListingPage';
describe('ListingPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/ManageListingsPage/ManageListingsPage.js b/src/containers/ManageListingsPage/ManageListingsPage.js
index 5c1d1c11..f9919b58 100644
--- a/src/containers/ManageListingsPage/ManageListingsPage.js
+++ b/src/containers/ManageListingsPage/ManageListingsPage.js
@@ -1,11 +1,11 @@
import React from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
export default () => (
-
+
-
-)
+
+);
diff --git a/src/containers/ManageListingsPage/ManageListingsPage.test.js b/src/containers/ManageListingsPage/ManageListingsPage.test.js
index 574dd53b..98c305f2 100644
--- a/src/containers/ManageListingsPage/ManageListingsPage.test.js
+++ b/src/containers/ManageListingsPage/ManageListingsPage.test.js
@@ -6,11 +6,9 @@ import ManageListingsPage from './ManageListingsPage';
describe('ManageListingsPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/NotFoundPage/NotFoundPage.js b/src/containers/NotFoundPage/NotFoundPage.js
index 1b6cc3f9..2aa3dc62 100644
--- a/src/containers/NotFoundPage/NotFoundPage.js
+++ b/src/containers/NotFoundPage/NotFoundPage.js
@@ -1,9 +1,9 @@
import React from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
export default () => (
-
+
Index page
-
-)
+
+);
diff --git a/src/containers/NotFoundPage/NotFoundPage.test.js b/src/containers/NotFoundPage/NotFoundPage.test.js
index 254c66c6..027ab5dc 100644
--- a/src/containers/NotFoundPage/NotFoundPage.test.js
+++ b/src/containers/NotFoundPage/NotFoundPage.test.js
@@ -6,11 +6,9 @@ import NotFoundPage from './NotFoundPage';
describe('NotFoundPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/NotificationSettingsPage/NotificationSettingsPage.js b/src/containers/NotificationSettingsPage/NotificationSettingsPage.js
index a7116bf9..160a466f 100644
--- a/src/containers/NotificationSettingsPage/NotificationSettingsPage.js
+++ b/src/containers/NotificationSettingsPage/NotificationSettingsPage.js
@@ -1,4 +1,4 @@
import React from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
-export default () =>
+export default () => ;
diff --git a/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js b/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js
index 2266fec6..6c9df32b 100644
--- a/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js
+++ b/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js
@@ -6,11 +6,9 @@ import NotificationSettingsPage from './NotificationSettingsPage';
describe('NotificationSettingsPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/OrderPage/OrderPage.js b/src/containers/OrderPage/OrderPage.js
index 0bf79296..21b6ac16 100644
--- a/src/containers/OrderPage/OrderPage.js
+++ b/src/containers/OrderPage/OrderPage.js
@@ -1,28 +1,26 @@
/* eslint-disable react/no-unescaped-entities */
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const OrderPage = props => {
const { params } = props;
return (
-
+
Order id: {params.id}
Discussion tab
Details tab
Mobile layout needs different views for discussion and details.
- Discussion view is the default if route doesn't specify mobile tab (e.g.
- /order/1234
- )
+ Discussion view is the default if route doesn't specify mobile tab (e.g. /order/1234 )
-
+
);
};
-const { shape, number } = PropTypes;
+const { number, oneOfType, shape, string } = PropTypes;
-OrderPage.propTypes = { params: shape({ id: number.isRequired }).isRequired };
+OrderPage.propTypes = { params: shape({ id: oneOfType([number, string]).isRequired }).isRequired };
export default OrderPage;
diff --git a/src/containers/OrderPage/OrderPage.test.js b/src/containers/OrderPage/OrderPage.test.js
index ebb298d4..f45def33 100644
--- a/src/containers/OrderPage/OrderPage.test.js
+++ b/src/containers/OrderPage/OrderPage.test.js
@@ -6,11 +6,9 @@ import OrderPage from './OrderPage';
describe('OrderPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/PasswordChangePage/PasswordChangePage.js b/src/containers/PasswordChangePage/PasswordChangePage.js
index 89b637d6..acbe8501 100644
--- a/src/containers/PasswordChangePage/PasswordChangePage.js
+++ b/src/containers/PasswordChangePage/PasswordChangePage.js
@@ -1,4 +1,4 @@
import React from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
-export default () =>
+export default () => ;
diff --git a/src/containers/PasswordChangePage/PasswordChangePage.test.js b/src/containers/PasswordChangePage/PasswordChangePage.test.js
index 2680449a..51ba7a55 100644
--- a/src/containers/PasswordChangePage/PasswordChangePage.test.js
+++ b/src/containers/PasswordChangePage/PasswordChangePage.test.js
@@ -6,11 +6,9 @@ import PasswordChangePage from './PasswordChangePage';
describe('PasswordChangePage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/PasswordForgottenPage/PasswordForgottenPage.js b/src/containers/PasswordForgottenPage/PasswordForgottenPage.js
index f779933f..1a51882a 100644
--- a/src/containers/PasswordForgottenPage/PasswordForgottenPage.js
+++ b/src/containers/PasswordForgottenPage/PasswordForgottenPage.js
@@ -1,4 +1,4 @@
import React from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
-export default () =>
+export default () => ;
diff --git a/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js b/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js
index ac9caba1..4f402450 100644
--- a/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js
+++ b/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js
@@ -6,11 +6,9 @@ import PasswordForgottenPage from './PasswordForgottenPage';
describe('PasswordForgottenPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/PaymentMethodsPage/PaymentMethodsPage.js b/src/containers/PaymentMethodsPage/PaymentMethodsPage.js
index 40a09b48..78c59097 100644
--- a/src/containers/PaymentMethodsPage/PaymentMethodsPage.js
+++ b/src/containers/PaymentMethodsPage/PaymentMethodsPage.js
@@ -1,4 +1,4 @@
import React from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
-export default () =>
+export default () => ;
diff --git a/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js b/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js
index 49a21213..b7cc0b6a 100644
--- a/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js
+++ b/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js
@@ -6,11 +6,9 @@ import PaymentMethodsPage from './PaymentMethodsPage';
describe('PaymentMethodsPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.js b/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.js
index 65c4fd17..f2b361c2 100644
--- a/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.js
+++ b/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.js
@@ -1,4 +1,4 @@
import React from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
-export default () =>
+export default () => ;
diff --git a/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js b/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js
index 2a249f99..cc60a1cb 100644
--- a/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js
+++ b/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js
@@ -6,11 +6,9 @@ import PayoutPreferencesPage from './PayoutPreferencesPage';
describe('PayoutPreferencesPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/ProfilePage/ProfilePage.js b/src/containers/ProfilePage/ProfilePage.js
index 6696d72a..d20de21e 100644
--- a/src/containers/ProfilePage/ProfilePage.js
+++ b/src/containers/ProfilePage/ProfilePage.js
@@ -1,8 +1,8 @@
import React, { PropTypes } from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const ProfilePage = ({ params }) => (
-
+
);
const { shape, string } = PropTypes;
diff --git a/src/containers/ProfilePage/ProfilePage.test.js b/src/containers/ProfilePage/ProfilePage.test.js
index 2c2e6586..291fe4b7 100644
--- a/src/containers/ProfilePage/ProfilePage.test.js
+++ b/src/containers/ProfilePage/ProfilePage.test.js
@@ -6,11 +6,9 @@ import ProfilePage from './ProfilePage';
describe('ProfilePage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/SalesConversationPage/SalesConversationPage.js b/src/containers/SalesConversationPage/SalesConversationPage.js
index 313dfeb4..f24f6725 100644
--- a/src/containers/SalesConversationPage/SalesConversationPage.js
+++ b/src/containers/SalesConversationPage/SalesConversationPage.js
@@ -1,23 +1,21 @@
/* eslint-disable react/no-unescaped-entities */
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
const SalesConversationPage = props => {
const { params } = props;
return (
-
+
Sale id: {params.id}
Discussion tab
Details tab
Mobile layout needs different views for discussion and details.
- Discussion view is the default if route doesn't specify mobile tab (e.g.
- /order/1234
- )
+ Discussion view is the default if route doesn't specify mobile tab (e.g. /order/1234 )
-
+
);
};
diff --git a/src/containers/SalesConversationPage/SalesConversationPage.test.js b/src/containers/SalesConversationPage/SalesConversationPage.test.js
index 6d45e10f..c32b43d8 100644
--- a/src/containers/SalesConversationPage/SalesConversationPage.test.js
+++ b/src/containers/SalesConversationPage/SalesConversationPage.test.js
@@ -6,11 +6,9 @@ import SalesConversationPage from './SalesConversationPage';
describe('SalesConversationPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
diff --git a/src/containers/SearchPage/SearchPage.js b/src/containers/SearchPage/SearchPage.js
index 358f6aef..bb8e7d4a 100644
--- a/src/containers/SearchPage/SearchPage.js
+++ b/src/containers/SearchPage/SearchPage.js
@@ -1,7 +1,7 @@
import React from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
import { addFlashNotification } from '../../ducks/FlashNotification';
import { addFilter } from './SearchPageDucks';
diff --git a/src/containers/SecurityPage/SecurityPage.js b/src/containers/SecurityPage/SecurityPage.js
index 4f343345..c9a834fa 100644
--- a/src/containers/SecurityPage/SecurityPage.js
+++ b/src/containers/SecurityPage/SecurityPage.js
@@ -1,8 +1,8 @@
import React from 'react';
-import { Page } from '../../components';
+import { PageLayout } from '../../components';
export default () => (
-
+
Change password, delete account
-
-)
+
+);
diff --git a/src/containers/SecurityPage/SecurityPage.test.js b/src/containers/SecurityPage/SecurityPage.test.js
index 6f371307..1da5ecfc 100644
--- a/src/containers/SecurityPage/SecurityPage.test.js
+++ b/src/containers/SecurityPage/SecurityPage.test.js
@@ -6,11 +6,9 @@ import SecurityPage from './SecurityPage';
describe('SecurityPage', () => {
it('matches snapshot', () => {
const component = renderer.create(
- (
-
-
-
- ),
+
+
+ ,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();