From ef1a8eb15d8070793c54862e7184f4f398fe513c Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Wed, 18 Jan 2017 15:08:14 +0200 Subject: [PATCH] Format with Prettier --- src/Routes.js | 126 ++++++++---------- src/app.js | 14 +- src/app.test.js | 8 +- src/components/Page/Page.js | 12 +- .../AuthenticationPage/AuthenticationPage.js | 40 +++--- .../AuthenticationPage.test.js | 8 +- src/containers/CheckoutPage/CheckoutPage.js | 6 +- .../CheckoutPage/CheckoutPage.test.js | 8 +- .../ContactDetailsPage/ContactDetailsPage.js | 4 +- .../ContactDetailsPage.test.js | 8 +- .../ConversationPage/ConversationPage.js | 6 +- .../ConversationPage/ConversationPage.test.js | 8 +- .../EditProfilePage/EditProfilePage.js | 7 +- .../EditProfilePage/EditProfilePage.test.js | 8 +- src/containers/InboxPage/InboxPage.js | 12 +- src/containers/InboxPage/InboxPage.test.js | 8 +- src/containers/LandingPage/LandingPage.js | 2 +- .../LandingPage/LandingPage.test.js | 8 +- src/containers/ListingPage/ListingPage.js | 12 +- .../ListingPage/ListingPage.test.js | 8 +- .../ManageListingsPage/ManageListingsPage.js | 5 +- .../ManageListingsPage.test.js | 8 +- src/containers/NotFoundPage/NotFoundPage.js | 2 +- .../NotFoundPage/NotFoundPage.test.js | 8 +- .../NotificationSettingsPage.js | 2 +- .../NotificationSettingsPage.test.js | 8 +- src/containers/OrderPage/OrderPage.js | 19 ++- src/containers/OrderPage/OrderPage.test.js | 8 +- .../PasswordChangePage/PasswordChangePage.js | 2 +- .../PasswordChangePage.test.js | 8 +- .../PasswordForgottenPage.js | 2 +- .../PasswordForgottenPage.test.js | 8 +- .../PaymentMethodsPage/PaymentMethodsPage.js | 4 +- .../PaymentMethodsPage.test.js | 8 +- .../PayoutPreferencesPage.js | 2 +- .../PayoutPreferencesPage.test.js | 8 +- src/containers/ProfilePage/ProfilePage.js | 4 +- .../ProfilePage/ProfilePage.test.js | 8 +- .../SalesConversationPage.js | 19 ++- .../SalesConversationPage.test.js | 8 +- src/containers/SearchPage/SearchPage.js | 2 +- src/containers/SearchPage/SearchPage.test.js | 8 +- src/containers/SecurityPage/SecurityPage.js | 4 +- .../SecurityPage/SecurityPage.test.js | 8 +- src/containers/Topbar/Topbar.js | 51 ++++--- 45 files changed, 273 insertions(+), 254 deletions(-) diff --git a/src/Routes.js b/src/Routes.js index 4e2ce7b9..338e22bb 100644 --- a/src/Routes.js +++ b/src/Routes.js @@ -40,22 +40,19 @@ export const fakeAuth = { this.isAuthenticated = false; cb(); window.setTimeout(cb, 100); // weird bug if async? - } + }, }; // User must be authenticated before he can see certain pages export const MatchWhenAuthorized = ({ component: Component, ...rest }) => ( - ( - fakeAuth.isAuthenticated ? - ( ) : - ( - ) - ) - }/> + { + return fakeAuth.isAuthenticated + ? + : ; + }} + /> ); class Routes extends React.Component { @@ -66,138 +63,127 @@ class Routes extends React.Component { render() { return (
- + {/* Search view */} - + {/* Listing view */} - - + + {/* profile / storefront view */} - - - + + + {/* checkout */} - + {/* Login and signup */} - } /> + component={props => } + /> - } /> + component={props => } + /> {/* Password forgotten */} - + {/* Change password */} - + {/* Inbox and filtered views */} } /> + component={props => } + /> } /> + component={props => } + /> } /> + component={props => } + /> {/* Order/Conversation and mobile views */} - + } /> + component={props => } + /> } /> + component={props => } + /> } /> + component={props => } + /> } /> + component={props => } + /> } /> + component={props => } + /> } /> + component={props => } + /> {/* Manage listings */} - + {/* Account settings */} } /> + component={() => } + /> + component={ContactDetailsPage} + /> + component={NotificationSettingsPage} + /> + component={PaymentMethodsPage} + /> - - - - - + component={PayoutPreferencesPage} + /> + +
); } } -Routes.childContextTypes = { - router: React.PropTypes.object -}; +Routes.childContextTypes = { router: React.PropTypes.object }; export default Routes; diff --git a/src/app.js b/src/app.js index 7bb9e0b8..e8634f93 100644 --- a/src/app.js +++ b/src/app.js @@ -4,19 +4,19 @@ import Helmet from 'react-helmet'; import { BrowserRouter, ServerRouter } from 'react-router'; import Routes from './Routes'; -const RoutesWithRouterProp = ({ router }) => +const RoutesWithRouterProp = ({ router }) => ; export const ClientApp = () => ( - { RoutesWithRouterProp } + {RoutesWithRouterProp} ); -export const ServerApp = (props) => { +export const ServerApp = props => { const { url, context } = props; return ( - - { RoutesWithRouterProp } + + {RoutesWithRouterProp} ); }; @@ -32,9 +32,7 @@ export const ServerApp = (props) => { * - {Object} head: Application head metadata from react-helmet */ export const renderApp = (url, serverContext) => { - const body = ReactDOMServer.renderToString( - - ); + const body = ReactDOMServer.renderToString(); const head = Helmet.rewind(); return { head, body }; }; diff --git a/src/app.test.js b/src/app.test.js index 170b309f..ad415995 100644 --- a/src/app.test.js +++ b/src/app.test.js @@ -5,11 +5,8 @@ import { forEach } from 'lodash'; import { createServerRenderContext } from 'react-router'; import { ClientApp, ServerApp } from './app'; -const render = (url, context) => ( - ReactDOMServer.renderToString( - - ) -); +const render = (url, context) => + ReactDOMServer.renderToString(); describe('Application', () => { it('renders in the client without crashing', () => { @@ -65,6 +62,5 @@ describe('Application', () => { const result = context.getResult(); expect(result.redirect.pathname).toEqual(redirectPath); }); - }); }); diff --git a/src/components/Page/Page.js b/src/components/Page/Page.js index 60fd2627..3714466d 100644 --- a/src/components/Page/Page.js +++ b/src/components/Page/Page.js @@ -2,14 +2,14 @@ import React from 'react'; import Helmet from 'react-helmet'; import { Topbar } from '../../containers'; -export default (props) => { +export default props => { const { className, title, children } = props; return ( -
- +
+ -

{ title }

- { children } +

{title}

+ {children}
); -}; +} diff --git a/src/containers/AuthenticationPage/AuthenticationPage.js b/src/containers/AuthenticationPage/AuthenticationPage.js index a7e4c10f..e600c27f 100644 --- a/src/containers/AuthenticationPage/AuthenticationPage.js +++ b/src/containers/AuthenticationPage/AuthenticationPage.js @@ -4,12 +4,9 @@ import { Page } from '../../components'; import { fakeAuth } from '../../Routes'; class AuthenticationPage extends Component { - constructor(props) { super(props); - this.state = { - redirectToReferrer: false, - }; + this.state = { redirectToReferrer: false }; this.login = this.login.bind(this); } @@ -17,36 +14,35 @@ class AuthenticationPage extends Component { login() { fakeAuth.authenticate(() => { this.setState({ redirectToReferrer: true }); - }) + }); } render() { const { from } = this.props.location.state || '/'; const { redirectToReferrer } = this.state; - const toLogin = Log in; - const toSignup = Sign up; + const toLogin = Log in; + const toSignup = ( + Sign up + ); 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 } - -

or { alternativeMethod }

+ + {redirectToReferrer ? : null} + {fromLoginMsg} + +

or {alternativeMethod}

- ) + ); } } diff --git a/src/containers/AuthenticationPage/AuthenticationPage.test.js b/src/containers/AuthenticationPage/AuthenticationPage.test.js index e2d04a1a..c6fc46de 100644 --- a/src/containers/AuthenticationPage/AuthenticationPage.test.js +++ b/src/containers/AuthenticationPage/AuthenticationPage.test.js @@ -6,9 +6,11 @@ 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 50723c9b..2a494743 100644 --- a/src/containers/CheckoutPage/CheckoutPage.js +++ b/src/containers/CheckoutPage/CheckoutPage.js @@ -3,7 +3,7 @@ import { Link } from 'react-router'; import { Page } from '../../components'; export default ({ params }) => ( - - + + -); +) diff --git a/src/containers/CheckoutPage/CheckoutPage.test.js b/src/containers/CheckoutPage/CheckoutPage.test.js index f901e009..5fa8d7e1 100644 --- a/src/containers/CheckoutPage/CheckoutPage.test.js +++ b/src/containers/CheckoutPage/CheckoutPage.test.js @@ -6,9 +6,11 @@ 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 35d57f16..416dbf7b 100644 --- a/src/containers/ContactDetailsPage/ContactDetailsPage.js +++ b/src/containers/ContactDetailsPage/ContactDetailsPage.js @@ -1,6 +1,4 @@ import React from 'react'; import { Page } from '../../components'; -export default () => ( - -); +export default () => diff --git a/src/containers/ContactDetailsPage/ContactDetailsPage.test.js b/src/containers/ContactDetailsPage/ContactDetailsPage.test.js index 1b4bfce0..ae0d096c 100644 --- a/src/containers/ContactDetailsPage/ContactDetailsPage.test.js +++ b/src/containers/ContactDetailsPage/ContactDetailsPage.test.js @@ -6,9 +6,11 @@ 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 4dc0ee79..785b1f19 100644 --- a/src/containers/ConversationPage/ConversationPage.js +++ b/src/containers/ConversationPage/ConversationPage.js @@ -1,11 +1,11 @@ import React from 'react'; import { Page } from '../../components'; -export default (props) => { +export default props => { const { params } = props; return ( -

Conversation id: { params.id }

+

Conversation id: {params.id}

); -}; +} diff --git a/src/containers/ConversationPage/ConversationPage.test.js b/src/containers/ConversationPage/ConversationPage.test.js index dd778e3e..4a4f9dbb 100644 --- a/src/containers/ConversationPage/ConversationPage.test.js +++ b/src/containers/ConversationPage/ConversationPage.test.js @@ -6,9 +6,11 @@ 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 1fb0fd5a..d02fc795 100644 --- a/src/containers/EditProfilePage/EditProfilePage.js +++ b/src/containers/EditProfilePage/EditProfilePage.js @@ -4,8 +4,7 @@ import { Page } from '../../components'; export default (props, context) => { const { params } = props; return ( - + - ) -}; + ); +} diff --git a/src/containers/EditProfilePage/EditProfilePage.test.js b/src/containers/EditProfilePage/EditProfilePage.test.js index 468d9e22..ef5c30ba 100644 --- a/src/containers/EditProfilePage/EditProfilePage.test.js +++ b/src/containers/EditProfilePage/EditProfilePage.test.js @@ -6,9 +6,11 @@ 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 bcbcc04c..8d5e5e16 100644 --- a/src/containers/InboxPage/InboxPage.js +++ b/src/containers/InboxPage/InboxPage.js @@ -3,7 +3,7 @@ import { Link } from 'react-router'; import { Page } from '../../components'; const toPath = (filter, id) => { - switch(filter) { + switch (filter) { case 'orders': return `/order/${id}`; case 'sales': @@ -11,15 +11,15 @@ const toPath = (filter, id) => { default: return `/conversation/${id}`; } -} +}; -export default (props) => { +export default props => { const { filter } = props; return ( - +
    -
  • Single thread
  • +
  • Single thread
); -}; +} diff --git a/src/containers/InboxPage/InboxPage.test.js b/src/containers/InboxPage/InboxPage.test.js index 04e5b4f3..7076f86e 100644 --- a/src/containers/InboxPage/InboxPage.test.js +++ b/src/containers/InboxPage/InboxPage.test.js @@ -6,9 +6,11 @@ import InboxPage from './InboxPage'; describe('InboxPage', () => { it('matches snapshot', () => { const component = renderer.create( - - - + ( + + + + ), ); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); diff --git a/src/containers/LandingPage/LandingPage.js b/src/containers/LandingPage/LandingPage.js index d73c2b99..2c0b297a 100644 --- a/src/containers/LandingPage/LandingPage.js +++ b/src/containers/LandingPage/LandingPage.js @@ -6,4 +6,4 @@ export default () => ( Find studios -); +) diff --git a/src/containers/LandingPage/LandingPage.test.js b/src/containers/LandingPage/LandingPage.test.js index b43af69a..bce166df 100644 --- a/src/containers/LandingPage/LandingPage.test.js +++ b/src/containers/LandingPage/LandingPage.test.js @@ -6,9 +6,11 @@ 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 45c8a509..6bd57983 100644 --- a/src/containers/ListingPage/ListingPage.js +++ b/src/containers/ListingPage/ListingPage.js @@ -3,7 +3,6 @@ import { Link } from 'react-router'; import { Page } from '../../components'; export default ({ params }) => { - // Listing id should be located either in the end of slug // - https://example.com/l/listing-title-as-slug-12345 // - https://example.com/l/12345 @@ -11,11 +10,10 @@ export default ({ params }) => { const id = slugAndId[slugAndId.length - 1]; // TODO: Fetch data from SDK if no data is passed through props - return ( - -

Slug: { params.slug }

- + +

Slug: {params.slug}

+
- ) -}; + ); +} diff --git a/src/containers/ListingPage/ListingPage.test.js b/src/containers/ListingPage/ListingPage.test.js index e4c309fc..7b427688 100644 --- a/src/containers/ListingPage/ListingPage.test.js +++ b/src/containers/ListingPage/ListingPage.test.js @@ -6,9 +6,11 @@ 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 ea950487..5c1d1c11 100644 --- a/src/containers/ManageListingsPage/ManageListingsPage.js +++ b/src/containers/ManageListingsPage/ManageListingsPage.js @@ -3,10 +3,9 @@ import { Link } from 'react-router'; import { Page } from '../../components'; export default () => ( - +
  • Listing 1234
-); - +) diff --git a/src/containers/ManageListingsPage/ManageListingsPage.test.js b/src/containers/ManageListingsPage/ManageListingsPage.test.js index 2d0f828f..574dd53b 100644 --- a/src/containers/ManageListingsPage/ManageListingsPage.test.js +++ b/src/containers/ManageListingsPage/ManageListingsPage.test.js @@ -6,9 +6,11 @@ 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 3ab2f41b..1b6cc3f9 100644 --- a/src/containers/NotFoundPage/NotFoundPage.js +++ b/src/containers/NotFoundPage/NotFoundPage.js @@ -6,4 +6,4 @@ export default () => ( Index page -); +) diff --git a/src/containers/NotFoundPage/NotFoundPage.test.js b/src/containers/NotFoundPage/NotFoundPage.test.js index 9edb6cbd..254c66c6 100644 --- a/src/containers/NotFoundPage/NotFoundPage.test.js +++ b/src/containers/NotFoundPage/NotFoundPage.test.js @@ -6,9 +6,11 @@ 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 1d87d0b3..001ff016 100644 --- a/src/containers/NotificationSettingsPage/NotificationSettingsPage.js +++ b/src/containers/NotificationSettingsPage/NotificationSettingsPage.js @@ -4,4 +4,4 @@ import { Page } from '../../components'; export default () => ( -); +) diff --git a/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js b/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js index c2457679..2266fec6 100644 --- a/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js +++ b/src/containers/NotificationSettingsPage/NotificationSettingsPage.test.js @@ -6,9 +6,11 @@ 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 475c2847..50f8b667 100644 --- a/src/containers/OrderPage/OrderPage.js +++ b/src/containers/OrderPage/OrderPage.js @@ -1,17 +1,22 @@ +/* eslint-disable react/no-unescaped-entities */ import React from 'react'; import { Link } from 'react-router'; import { Page } from '../../components'; -export default (props) => { +export default props => { const { params } = props; return ( - -

Order id: { params.id }

- Discussion tab + +

Order id: {params.id}

+ Discussion tab
- Details 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/OrderPage/OrderPage.test.js b/src/containers/OrderPage/OrderPage.test.js index 63ca6f4f..ebb298d4 100644 --- a/src/containers/OrderPage/OrderPage.test.js +++ b/src/containers/OrderPage/OrderPage.test.js @@ -6,9 +6,11 @@ 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 3ee70726..c4c410c0 100644 --- a/src/containers/PasswordChangePage/PasswordChangePage.js +++ b/src/containers/PasswordChangePage/PasswordChangePage.js @@ -4,4 +4,4 @@ import { Page } from '../../components'; export default () => ( -); +) diff --git a/src/containers/PasswordChangePage/PasswordChangePage.test.js b/src/containers/PasswordChangePage/PasswordChangePage.test.js index 68a0d6b6..2680449a 100644 --- a/src/containers/PasswordChangePage/PasswordChangePage.test.js +++ b/src/containers/PasswordChangePage/PasswordChangePage.test.js @@ -6,9 +6,11 @@ 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 db7c047c..6399c346 100644 --- a/src/containers/PasswordForgottenPage/PasswordForgottenPage.js +++ b/src/containers/PasswordForgottenPage/PasswordForgottenPage.js @@ -4,4 +4,4 @@ import { Page } from '../../components'; export default () => ( -); +) diff --git a/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js b/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js index 42dd6015..ac9caba1 100644 --- a/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js +++ b/src/containers/PasswordForgottenPage/PasswordForgottenPage.test.js @@ -6,9 +6,11 @@ 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 9fc31f98..996e351c 100644 --- a/src/containers/PaymentMethodsPage/PaymentMethodsPage.js +++ b/src/containers/PaymentMethodsPage/PaymentMethodsPage.js @@ -2,6 +2,6 @@ import React from 'react'; import { Page } from '../../components'; export default () => ( - + -); +) diff --git a/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js b/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js index 0b74003e..49a21213 100644 --- a/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js +++ b/src/containers/PaymentMethodsPage/PaymentMethodsPage.test.js @@ -6,9 +6,11 @@ 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 f8bf8ea4..e7c0bbb4 100644 --- a/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.js +++ b/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.js @@ -4,4 +4,4 @@ import { Page } from '../../components'; export default () => ( -); +) diff --git a/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js b/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js index de4911ef..2a249f99 100644 --- a/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js +++ b/src/containers/PayoutPreferencesPage/PayoutPreferencesPage.test.js @@ -6,9 +6,11 @@ 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 d03cc097..f4d6f28d 100644 --- a/src/containers/ProfilePage/ProfilePage.js +++ b/src/containers/ProfilePage/ProfilePage.js @@ -2,6 +2,6 @@ import React from 'react'; import { Page } from '../../components'; export default ({ params }) => ( - + -); +) diff --git a/src/containers/ProfilePage/ProfilePage.test.js b/src/containers/ProfilePage/ProfilePage.test.js index 03a5771b..2c2e6586 100644 --- a/src/containers/ProfilePage/ProfilePage.test.js +++ b/src/containers/ProfilePage/ProfilePage.test.js @@ -6,9 +6,11 @@ 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 4914b9b5..907d5d7a 100644 --- a/src/containers/SalesConversationPage/SalesConversationPage.js +++ b/src/containers/SalesConversationPage/SalesConversationPage.js @@ -1,17 +1,22 @@ +/* eslint-disable react/no-unescaped-entities */ import React from 'react'; import { Link } from 'react-router'; import { Page } from '../../components'; -export default (props) => { +export default props => { const { params } = props; return ( - -

Sale id: { params.id }

- Discussion tab + +

Sale id: {params.id}

+ Discussion tab
- Details 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 ecb3e48a..6d45e10f 100644 --- a/src/containers/SalesConversationPage/SalesConversationPage.test.js +++ b/src/containers/SalesConversationPage/SalesConversationPage.test.js @@ -6,9 +6,11 @@ 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 6c4972b0..8b0ba9dd 100644 --- a/src/containers/SearchPage/SearchPage.js +++ b/src/containers/SearchPage/SearchPage.js @@ -6,4 +6,4 @@ export default () => ( Nice studio in Helsinki -); +) diff --git a/src/containers/SearchPage/SearchPage.test.js b/src/containers/SearchPage/SearchPage.test.js index 4d794253..893ea3c5 100644 --- a/src/containers/SearchPage/SearchPage.test.js +++ b/src/containers/SearchPage/SearchPage.test.js @@ -6,9 +6,11 @@ import SearchPage from './SearchPage'; describe('SearchPage', () => { it('matches snapshot', () => { const component = renderer.create( - - - + ( + + + + ), ); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); diff --git a/src/containers/SecurityPage/SecurityPage.js b/src/containers/SecurityPage/SecurityPage.js index f77407db..4f343345 100644 --- a/src/containers/SecurityPage/SecurityPage.js +++ b/src/containers/SecurityPage/SecurityPage.js @@ -2,7 +2,7 @@ import React from 'react'; import { Page } 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 35c6f20f..6f371307 100644 --- a/src/containers/SecurityPage/SecurityPage.test.js +++ b/src/containers/SecurityPage/SecurityPage.test.js @@ -6,9 +6,11 @@ import SecurityPage from './SecurityPage'; describe('SecurityPage', () => { it('matches snapshot', () => { const component = renderer.create( - - - + ( + + + + ), ); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); diff --git a/src/containers/Topbar/Topbar.js b/src/containers/Topbar/Topbar.js index 95a3ed70..34ad1164 100644 --- a/src/containers/Topbar/Topbar.js +++ b/src/containers/Topbar/Topbar.js @@ -3,45 +3,44 @@ import { Link } from 'react-router'; import { fakeAuth } from '../../Routes'; import css from './Topbar.css'; - -const SignoutButton = (props) => { +const SignoutButton = props => { const { router } = props; const handleClick = () => { fakeAuth.signout(() => { router.transitionTo('/'); }); }; - return (); + return ; }; - const Topbar = (props, context) => { const linkProps = { className: css.link }; - return (
- Home - Search - Listing page - Profile - Edit profile - Checkout - Inbox - Orders - Sales - Request password - Change password - Manage listings - Account settings - Contact details - Notification settings - Payment methods - Payout preferences - Security - -
); + return ( +
+ Home + Search + Listing page + Profile + Edit profile + Checkout + Inbox + Orders + Sales + Request password + Change password + Manage listings + Account settings + Contact details + Notification settings + Payment methods + Payout preferences + Security + +
+ ); }; Topbar.contextTypes = { router: React.PropTypes.object }; export default Topbar; -