diff --git a/server/index.js b/server/index.js index 6fc52234..0eb2439a 100644 --- a/server/index.js +++ b/server/index.js @@ -77,8 +77,7 @@ function fetchInitialState(requestUrl) { // pathname may match with several routes (if they don't have exact=true) // We filter all the components form matched routes that have `loadData` - const initialFetches = _ - .chain(matchedRoutes) + const initialFetches = _.chain(matchedRoutes) .filter(r => r.loadData) .map(r => sagaEffects.fork(r.loadData, sdk)) .value(); @@ -92,8 +91,9 @@ function fetchInitialState(requestUrl) { if (initialFetches.length > 0) { const fetchPromise = new Promise((resolve, reject) => { const store = configureStore({}); - store.runSaga(fetchInitialData).done - .then(() => { + store + .runSaga(fetchInitialData) + .done.then(() => { resolve(store.getState()); }) .catch(e => { diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js index db067bd2..4fdfcb5b 100644 --- a/src/containers/ListingPage/ListingPage.js +++ b/src/containers/ListingPage/ListingPage.js @@ -12,8 +12,7 @@ const info = { { id: 4, title: 'img4', imageUrl: 'http://placehold.it/750x470' }, { id: 5, title: 'img5', imageUrl: 'http://placehold.it/750x470' }, ], - description: ( - ` + description: `
Organic Music Production in a Sustainable, Ethical and Professional Studio.
@@ -24,20 +23,17 @@ const info = { Banyan Studios is a comfortable, conscious, inspiring and creative retreat for musicians trying to convey their message through state of the art Audio & Video. https://vimeo.com/168106603 - ` - ), + `, reviews: [ { id: 1, reviewer: { avatar: 'http://placehold.it/44x44', name: 'Vesa L.', date: 'January 2017' }, rating: 4, - review: ( - ` + review: ` Great studio in the New York for music professionals. Everything you need can be found from here and John was helpful with the right settings - we even got some tips for our songs! :) - ` - ), + `, }, ], }; diff --git a/src/containers/SearchPage/SearchPage.duck.js b/src/containers/SearchPage/SearchPage.duck.js index 996e4479..4c1955fc 100644 --- a/src/containers/SearchPage/SearchPage.duck.js +++ b/src/containers/SearchPage/SearchPage.duck.js @@ -80,16 +80,19 @@ export const loadListings = { # { id: 123, type: 'user', attributes: { name: "John" }}, ``` */ -const lookupMap = included => included.reduce((memo, resource) => { - const { type, id } = resource; +const lookupMap = included => included.reduce( + (memo, resource) => { + const { type, id } = resource; - // eslint-disable-next-line no-param-reassign - memo[type] = memo[type] || {}; - // eslint-disable-next-line no-param-reassign - memo[type][id.uuid] = resource; + // eslint-disable-next-line no-param-reassign + memo[type] = memo[type] || {}; + // eslint-disable-next-line no-param-reassign + memo[type][id.uuid] = resource; - return memo; -}, {}); + return memo; + }, + {}, +); // Format the data as ListingCard component expects it and // add some fake data diff --git a/src/examples.js b/src/examples.js index 7ac20ef3..4703682d 100644 --- a/src/examples.js +++ b/src/examples.js @@ -1,10 +1,12 @@ import * as BookingInfo from './components/BookingInfo/BookingInfo.example'; -import * as ChangeAccountPasswordForm from './containers/ChangeAccountPasswordForm/ChangeAccountPasswordForm.example'; +import * as ChangeAccountPasswordForm + from './containers/ChangeAccountPasswordForm/ChangeAccountPasswordForm.example'; import * as ChangePasswordForm from './containers/ChangePasswordForm/ChangePasswordForm.example'; import * as HeroSearchForm from './containers/HeroSearchForm/HeroSearchForm.example'; import * as LoginForm from './containers/LoginForm/LoginForm.example'; -import * as PasswordForgottenForm from './containers/PasswordForgottenForm/PasswordForgottenForm.example'; +import * as PasswordForgottenForm + from './containers/PasswordForgottenForm/PasswordForgottenForm.example'; import * as SignUpForm from './containers/SignUpForm/SignUpForm.example'; export { diff --git a/src/util/routes.js b/src/util/routes.js index 097618e5..7ee39b43 100644 --- a/src/util/routes.js +++ b/src/util/routes.js @@ -84,8 +84,7 @@ export const withFlattenedRoutes = Component => {