diff --git a/src/containers/EmailVerificationPage/EmailVerificationPage.js b/src/containers/EmailVerificationPage/EmailVerificationPage.js
index 3879f79a..9ac9e366 100644
--- a/src/containers/EmailVerificationPage/EmailVerificationPage.js
+++ b/src/containers/EmailVerificationPage/EmailVerificationPage.js
@@ -62,19 +62,19 @@ export const EmailVerificationPageComponent = props => {
-
- {currentUser
- ?
- : }
+ {currentUser ? (
+
+ ) : (
+
+ )}
-
);
};
diff --git a/src/containers/InboxPage/InboxPage.css b/src/containers/InboxPage/InboxPage.css
index e9603f11..47b10745 100644
--- a/src/containers/InboxPage/InboxPage.css
+++ b/src/containers/InboxPage/InboxPage.css
@@ -49,13 +49,11 @@
}
.content {
-
/* Expand to the full remaining width of the viewport */
flex: 1;
display: flex;
flex-direction: column;
-
@media (--viewportLarge) {
padding: 118px 15vw 82px 82px;
background-color: var(--matterColorLight);
@@ -70,7 +68,6 @@
}
.navigation {
-
/* Layout */
display: flex;
flex-direction: row;
@@ -102,7 +99,6 @@
}
.title {
-
/* Font */
@apply --marketplaceH1FontStyles;
color: var(--matterColor);
@@ -111,7 +107,6 @@
margin-top: 0;
margin-bottom: 0;
-
@media (--viewportMedium) {
padding-bottom: 10px;
margin-top: 0;
@@ -380,7 +375,7 @@
color: var(--matterColor);
margin-top: 4px;
- @media (var--viewportMedium) {
+ @media (var--viewportmedium) {
margin-top: 9px;
}
}
diff --git a/src/containers/InboxPage/InboxPage.duck.js b/src/containers/InboxPage/InboxPage.duck.js
index daba0363..73ef5777 100644
--- a/src/containers/InboxPage/InboxPage.duck.js
+++ b/src/containers/InboxPage/InboxPage.duck.js
@@ -70,46 +70,39 @@ const fetchOrdersOrSalesError = e => ({
const INBOX_PAGE_SIZE = 10;
-export const loadData = (params, search) =>
- (dispatch, getState, sdk) => {
- const { tab } = params;
+export const loadData = (params, search) => (dispatch, getState, sdk) => {
+ const { tab } = params;
- const onlyFilterValues = {
- orders: 'order',
- sales: 'sale',
- };
-
- const onlyFilter = onlyFilterValues[tab];
- if (!onlyFilter) {
- return Promise.reject(new Error(`Invalid tab for InboxPage: ${tab}`));
- }
-
- dispatch(fetchOrdersOrSalesRequest());
-
- const { page = 1 } = parse(search);
-
- const apiQueryParams = {
- only: onlyFilter,
- include: [
- 'provider',
- 'provider.profileImage',
- 'customer',
- 'customer.profileImage',
- 'booking',
- ],
- page,
- per_page: INBOX_PAGE_SIZE,
- };
-
- return sdk.transactions
- .query(apiQueryParams)
- .then(response => {
- dispatch(addMarketplaceEntities(response));
- dispatch(fetchOrdersOrSalesSuccess(response));
- return response;
- })
- .catch(e => {
- dispatch(fetchOrdersOrSalesError(e));
- throw e;
- });
+ const onlyFilterValues = {
+ orders: 'order',
+ sales: 'sale',
};
+
+ const onlyFilter = onlyFilterValues[tab];
+ if (!onlyFilter) {
+ return Promise.reject(new Error(`Invalid tab for InboxPage: ${tab}`));
+ }
+
+ dispatch(fetchOrdersOrSalesRequest());
+
+ const { page = 1 } = parse(search);
+
+ const apiQueryParams = {
+ only: onlyFilter,
+ include: ['provider', 'provider.profileImage', 'customer', 'customer.profileImage', 'booking'],
+ page,
+ per_page: INBOX_PAGE_SIZE,
+ };
+
+ return sdk.transactions
+ .query(apiQueryParams)
+ .then(response => {
+ dispatch(addMarketplaceEntities(response));
+ dispatch(fetchOrdersOrSalesSuccess(response));
+ return response;
+ })
+ .catch(e => {
+ dispatch(fetchOrdersOrSalesError(e));
+ throw e;
+ });
+};
diff --git a/src/containers/InboxPage/InboxPage.js b/src/containers/InboxPage/InboxPage.js
index a0155bd7..e1dce82c 100644
--- a/src/containers/InboxPage/InboxPage.js
+++ b/src/containers/InboxPage/InboxPage.js
@@ -128,9 +128,7 @@ export const InboxItem = props => {
-
- {rowNotificationDot}
-
+
{rowNotificationDot}
{otherUserDisplayName}
@@ -194,40 +192,45 @@ export const InboxPageComponent = props => {
);
};
- const error = fetchOrdersOrSalesError
- ?
-
-
- : null;
+ const error = fetchOrdersOrSalesError ? (
+
+
+
+ ) : null;
- const noResults = !fetchInProgress && transactions.length === 0 && !fetchOrdersOrSalesError
- ?
+ const noResults =
+ !fetchInProgress && transactions.length === 0 && !fetchOrdersOrSalesError ? (
+
- : null;
+ ) : null;
const hasOrderOrSaleTransactions = (tx, isOrdersTab, user) => {
return isOrdersTab
? tx && tx.length > 0 && tx[0].customer.id.uuid === user.id.uuid
: tx && tx.length > 0 && tx[0].provider.id.uuid === user.id.uuid;
};
- const hasTransactions = !fetchInProgress &&
- hasOrderOrSaleTransactions(transactions, isOrders, currentUser);
- const pagingLinks = hasTransactions && pagination && pagination.totalPages > 1
- ?
1 ? (
+
- : null;
+ ) : null;
- const providerNotificationBadge = providerNotificationCount > 0
- ?
- : null;
+ const providerNotificationBadge =
+ providerNotificationCount > 0 ? : null;
const tabs = [
{
- text: ,
+ text: (
+
+
+
+ ),
selected: isOrders,
linkProps: {
name: 'InboxPage',
@@ -236,7 +239,10 @@ export const InboxPageComponent = props => {
},
{
text: (
- {providerNotificationBadge}
+
+
+ {providerNotificationBadge}
+
),
selected: !isOrders,
linkProps: {
@@ -311,17 +317,9 @@ InboxPageComponent.propTypes = {
};
const mapStateToProps = state => {
- const {
- fetchInProgress,
- fetchOrdersOrSalesError,
- pagination,
- transactionRefs,
- } = state.InboxPage;
+ const { fetchInProgress, fetchOrdersOrSalesError, pagination, transactionRefs } = state.InboxPage;
const { authInfoError, logoutError } = state.Auth;
- const {
- currentUser,
- currentUserNotificationCount: providerNotificationCount,
- } = state.user;
+ const { currentUser, currentUserNotificationCount: providerNotificationCount } = state.user;
return {
authInfoError,
currentUser,
diff --git a/src/containers/LandingPage/LandingPage.css b/src/containers/LandingPage/LandingPage.css
index f194ee40..ed4d75dc 100644
--- a/src/containers/LandingPage/LandingPage.css
+++ b/src/containers/LandingPage/LandingPage.css
@@ -1,7 +1,6 @@
@import '../../marketplace.css';
.root {
-
}
/* heroContainer gives the height for HeroSection */
@@ -14,11 +13,11 @@
@media (--viewportMedium) {
min-height: calc(100vh - var(--topbarHeightDesktop));
- border: solid 24px #FFF;
+ border: solid 24px #fff;
}
@media (--viewportLarge) {
- border: solid 36px #FFF;
+ border: solid 36px #fff;
}
}
diff --git a/src/containers/LandingPage/LandingPage.js b/src/containers/LandingPage/LandingPage.js
index 812c160c..ee852b5b 100644
--- a/src/containers/LandingPage/LandingPage.js
+++ b/src/containers/LandingPage/LandingPage.js
@@ -13,14 +13,7 @@ import twitterImage from '../../assets/saunatimeTwitter-600x314.jpg';
import css from './LandingPage.css';
export const LandingPageComponent = props => {
- const {
- authInfoError,
- history,
- intl,
- location,
- logoutError,
- scrollingDisabled,
- } = props;
+ const { authInfoError, history, intl, location, logoutError, scrollingDisabled } = props;
// Schema for search engines (helps them to understand what this page is about)
// http://schema.org
@@ -41,8 +34,7 @@ export const LandingPageComponent = props => {
title={schemaTitle}
facebookImages={[{ url: facebookImage, width: 1200, height: 630 }]}
twitterImages={[{ url: twitterImage, width: 600, height: 314 }]}
- schema={
- `
+ schema={`
{
"@context": "http://schema.org",
"@type": "WebPage",
@@ -52,8 +44,7 @@ export const LandingPageComponent = props => {
"${schemaImage}"
]
}
- `
- }
+ `}
>
diff --git a/src/containers/ListingPage/EditIcon.js b/src/containers/ListingPage/EditIcon.js
index 6ff5ce80..51bce939 100644
--- a/src/containers/ListingPage/EditIcon.js
+++ b/src/containers/ListingPage/EditIcon.js
@@ -22,9 +22,7 @@ const EditIcon = props => {
-
+
diff --git a/src/containers/ListingPage/ListingPage.css b/src/containers/ListingPage/ListingPage.css
index f6951661..e015703e 100644
--- a/src/containers/ListingPage/ListingPage.css
+++ b/src/containers/ListingPage/ListingPage.css
@@ -96,7 +96,7 @@
}
.editIcon {
- margin: -6px 7px 0 0 ;
+ margin: -6px 7px 0 0;
}
.rootForImage {
@@ -280,7 +280,6 @@
}
}
-
.heading {
margin-bottom: 33px;
padding: 0 24px;
@@ -405,7 +404,7 @@
/* Contain repainting to this component only */
/* 3D painting container helps scrolling */
- transform: translate3d(0,0,0);
+ transform: translate3d(0, 0, 0);
@media (--viewportMedium) {
padding: 18px 60px 18px 60px;
@@ -453,7 +452,6 @@
}
.modalInMobile {
-
@media (--viewportLarge) {
display: block;
margin-top: 87px;
diff --git a/src/containers/ListingPage/ListingPage.duck.js b/src/containers/ListingPage/ListingPage.duck.js
index 96bfea08..f41607d7 100644
--- a/src/containers/ListingPage/ListingPage.duck.js
+++ b/src/containers/ListingPage/ListingPage.duck.js
@@ -40,17 +40,16 @@ export const showListingError = e => ({
payload: e,
});
-export const showListing = listingId =>
- (dispatch, getState, sdk) => {
- dispatch(showListingRequest(listingId));
- dispatch(fetchCurrentUser());
- return sdk.listings
- .show({ id: listingId, include: ['author', 'author.profileImage', 'images'] })
- .then(data => {
- dispatch(addMarketplaceEntities(data));
- return data;
- })
- .catch(e => {
- dispatch(showListingError(e));
- });
- };
+export const showListing = listingId => (dispatch, getState, sdk) => {
+ dispatch(showListingRequest(listingId));
+ dispatch(fetchCurrentUser());
+ return sdk.listings
+ .show({ id: listingId, include: ['author', 'author.profileImage', 'images'] })
+ .then(data => {
+ dispatch(addMarketplaceEntities(data));
+ return data;
+ })
+ .catch(e => {
+ dispatch(showListingError(e));
+ });
+};
diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js
index 57ff782e..42dc6fc6 100644
--- a/src/containers/ListingPage/ListingPage.js
+++ b/src/containers/ListingPage/ListingPage.js
@@ -53,11 +53,7 @@ const priceData = (price, intl) => {
};
export const ActionBar = props => {
- const {
- isOwnListing,
- isClosed,
- editParams,
- } = props;
+ const { isOwnListing, isClosed, editParams } = props;
if (isOwnListing) {
return (
@@ -215,19 +211,19 @@ export class ListingPageComponent extends Component {
imageCarouselOpen: true,
});
};
- const viewPhotosButton = hasImages
- ?
-
-
- : null;
+ const viewPhotosButton = hasImages ? (
+
+
+
+ ) : null;
const authorAvailable = currentListing && currentListing.author;
const userAndListingAuthorAvailable = !!(currentUser && authorAvailable);
- const isOwnListing = userAndListingAuthorAvailable &&
- currentListing.author.id.uuid === currentUser.id.uuid;
+ const isOwnListing =
+ userAndListingAuthorAvailable && currentListing.author.id.uuid === currentUser.id.uuid;
const currentAuthor = ensureUser(authorAvailable ? currentListing.author : {});
const currentAuthorDisplayName = currentAuthor.attributes.profile.displayName;
@@ -238,14 +234,16 @@ export class ListingPageComponent extends Component {
const bookBtnMessage = intl.formatMessage({ id: 'ListingPage.ctaButtonMessage' });
const { formattedPrice, priceTitle } = priceData(price, intl);
- const map = geolocation
- ?
-
-
-
-
+ const map = geolocation ? (
+
+ ) : null;
const showClosedListingHelpText = currentListing.id && currentListing.attributes.closed;
const bookingHeading = (
@@ -289,15 +287,15 @@ export class ListingPageComponent extends Component {
// Action bar is wrapped with a div that prevents the click events
// to the parent that would otherwise open the image carousel
- const actionBar = currentListing.id
- ?
e.stopPropagation()}>
-
-
- : null;
+ const actionBar = currentListing.id ? (
+
e.stopPropagation()}>
+
+
+ ) : null;
const facebookImages = hasImages
? currentListing.images.map(image => {
@@ -336,8 +334,7 @@ export class ListingPageComponent extends Component {
facebookImages={facebookImages}
twitterImages={twitterImages}
canonicalPath={canonicalPath}
- schema={
- `
+ schema={`
{
"@context": "http://schema.org",
"@type": "ItemPage",
@@ -345,8 +342,7 @@ export class ListingPageComponent extends Component {
"name": "${schemaTitle}",
"image": ${schemaImages}
}
- `
- }
+ `}
>
{topbar}
@@ -441,14 +437,14 @@ export class ListingPageComponent extends Component {
{bookingHeading}
- {!currentListing.attributes.closed
- ?
- : null}
+ {!currentListing.attributes.closed ? (
+
+ ) : null}
@@ -460,13 +456,15 @@ export class ListingPageComponent extends Component {
- {!currentListing.attributes.closed
- ?
- {bookBtnMessage}
-
- :
-
-
}
+ {!currentListing.attributes.closed ? (
+
+ {bookBtnMessage}
+
+ ) : (
+
+
+
+ )}
diff --git a/src/containers/LoginForm/LoginForm.js b/src/containers/LoginForm/LoginForm.js
index 3f463292..1f38115a 100644
--- a/src/containers/LoginForm/LoginForm.js
+++ b/src/containers/LoginForm/LoginForm.js
@@ -60,7 +60,6 @@ const LoginFormComponent = props => {
return (
-
);
}
diff --git a/src/containers/NotFoundPage/NotFoundPage.css b/src/containers/NotFoundPage/NotFoundPage.css
index 935d327e..4873d051 100644
--- a/src/containers/NotFoundPage/NotFoundPage.css
+++ b/src/containers/NotFoundPage/NotFoundPage.css
@@ -20,7 +20,6 @@
@media (--viewportMedium) {
margin-top: 10vh;
}
-
}
.number {
diff --git a/src/containers/NotFoundPage/NotFoundPage.js b/src/containers/NotFoundPage/NotFoundPage.js
index 2e406433..bc3f809f 100644
--- a/src/containers/NotFoundPage/NotFoundPage.js
+++ b/src/containers/NotFoundPage/NotFoundPage.js
@@ -21,13 +21,7 @@ export class NotFoundPageComponent extends Component {
}
render() {
- const {
- authInfoError,
- history,
- logoutError,
- intl,
- scrollingDisabled,
- } = this.props;
+ const { authInfoError, history, logoutError, intl, scrollingDisabled } = this.props;
const title = intl.formatMessage({
id: 'NotFoundPage.title',
diff --git a/src/containers/OrderPage/OrderPage.duck.js b/src/containers/OrderPage/OrderPage.duck.js
index d65bbbf8..dbb905d0 100644
--- a/src/containers/OrderPage/OrderPage.duck.js
+++ b/src/containers/OrderPage/OrderPage.duck.js
@@ -46,51 +46,49 @@ const listingRelationship = txResponse => {
return txResponse.data.data.relationships.listing.data;
};
-export const fetchOrder = id =>
- (dispatch, getState, sdk) => {
- dispatch(fetchOrderRequest());
+export const fetchOrder = id => (dispatch, getState, sdk) => {
+ dispatch(fetchOrderRequest());
- let txResponse = null;
+ let txResponse = null;
- return sdk.transactions
- .show({ id, include: ['customer', 'provider', 'listing', 'booking'] }, { expand: true })
- .then(response => {
- txResponse = response;
- const listingId = listingRelationship(response).id;
- const entities = updatedEntities({}, response.data);
- const denormalised = denormalisedEntities(entities, 'listing', [listingId]);
- const listing = denormalised[0];
+ return sdk.transactions
+ .show({ id, include: ['customer', 'provider', 'listing', 'booking'] }, { expand: true })
+ .then(response => {
+ txResponse = response;
+ const listingId = listingRelationship(response).id;
+ const entities = updatedEntities({}, response.data);
+ const denormalised = denormalisedEntities(entities, 'listing', [listingId]);
+ const listing = denormalised[0];
- const canFetchListing = listing && listing.attributes && !listing.attributes.deleted;
-
- if (canFetchListing) {
- return sdk.listings.show({
- id: listingId,
- include: ['author', 'author.profileImage', 'images'],
- });
- } else {
- return response;
- }
- })
- .then(response => {
- dispatch(addMarketplaceEntities(txResponse));
- dispatch(addMarketplaceEntities(response));
- dispatch(fetchOrderSuccess(txResponse));
+ const canFetchListing = listing && listing.attributes && !listing.attributes.deleted;
+ if (canFetchListing) {
+ return sdk.listings.show({
+ id: listingId,
+ include: ['author', 'author.profileImage', 'images'],
+ });
+ } else {
return response;
- })
- .catch(e => {
- dispatch(fetchOrderError(e));
- throw e;
- });
- };
+ }
+ })
+ .then(response => {
+ dispatch(addMarketplaceEntities(txResponse));
+ dispatch(addMarketplaceEntities(response));
+ dispatch(fetchOrderSuccess(txResponse));
+
+ return response;
+ })
+ .catch(e => {
+ dispatch(fetchOrderError(e));
+ throw e;
+ });
+};
// loadData is a collection of async calls that need to be made
// before page has all the info it needs to render itself
-export const loadData = params =>
- dispatch => {
- const orderId = new types.UUID(params.id);
+export const loadData = params => dispatch => {
+ const orderId = new types.UUID(params.id);
- // Order (i.e. transaction entity in API, but from buyers perspective) contains order details
- return dispatch(fetchOrder(orderId));
- };
+ // Order (i.e. transaction entity in API, but from buyers perspective) contains order details
+ return dispatch(fetchOrder(orderId));
+};
diff --git a/src/containers/OrderPage/OrderPage.js b/src/containers/OrderPage/OrderPage.js
index 5fb50762..f3575886 100644
--- a/src/containers/OrderPage/OrderPage.js
+++ b/src/containers/OrderPage/OrderPage.js
@@ -31,7 +31,8 @@ export const OrderPageComponent = props => {
const listingTitle = currentListing.attributes.title;
// Redirect users with someone else's direct link to their own inbox/orders page.
- const isDataAvailable = currentUser &&
+ const isDataAvailable =
+ currentUser &&
currentTransaction.id &&
currentTransaction.id.uuid === params.id &&
currentTransaction.customer &&
@@ -47,13 +48,22 @@ export const OrderPageComponent = props => {
[css.tabContentVisible]: props.tab === 'details',
});
- const loadingOrFaildFetching = fetchOrderError
- ?
- :
;
+ const loadingOrFaildFetching = fetchOrderError ? (
+
+
+
+ ) : (
+
+
+
+ );
- const panel = isDataAvailable && currentTransaction.id
- ?
- : loadingOrFaildFetching;
+ const panel =
+ isDataAvailable && currentTransaction.id ? (
+
+ ) : (
+ loadingOrFaildFetching
+ );
return (
+ const genericFailure =
+ changePasswordError && !passwordErrorText ? (
+
- : null;
+ ) : null;
const classes = classNames(rootClassName || css.root, className);
const submitDisabled = invalid || submitting || inProgress;
diff --git a/src/containers/PasswordChangePage/PasswordChangePage.css b/src/containers/PasswordChangePage/PasswordChangePage.css
index 93b731b5..30d830f8 100644
--- a/src/containers/PasswordChangePage/PasswordChangePage.css
+++ b/src/containers/PasswordChangePage/PasswordChangePage.css
@@ -1,7 +1,6 @@
@import '../../marketplace.css';
.content {
-
@media (--viewportMedium) {
margin: 32px auto 0 auto;
max-width: 564px;
@@ -10,7 +9,6 @@
@media (--viewportLarge) {
margin: 0;
}
-
}
.desktopTopbar,
diff --git a/src/containers/PasswordChangePage/PasswordChangePage.duck.js b/src/containers/PasswordChangePage/PasswordChangePage.duck.js
index 6ee1600e..a93b9384 100644
--- a/src/containers/PasswordChangePage/PasswordChangePage.duck.js
+++ b/src/containers/PasswordChangePage/PasswordChangePage.duck.js
@@ -51,18 +51,17 @@ export const changePasswordClear = () => ({ type: CHANGE_PASSWORD_CLEAR });
// ================ Thunks ================ //
-export const changePassword = params =>
- (dispatch, getState, sdk) => {
- dispatch(changePasswordRequest());
- const { newPassword, currentPassword } = params;
+export const changePassword = params => (dispatch, getState, sdk) => {
+ dispatch(changePasswordRequest());
+ const { newPassword, currentPassword } = params;
- return sdk.currentUser
- .changePassword({ newPassword, currentPassword })
- .then(() => dispatch(changePasswordSuccess()))
- .catch(e => {
- dispatch(changePasswordError(e));
- // This is thrown so that form can be cleared
- // after a timeout on changePassword submit handler
- throw e;
- });
- };
+ return sdk.currentUser
+ .changePassword({ newPassword, currentPassword })
+ .then(() => dispatch(changePasswordSuccess()))
+ .catch(e => {
+ dispatch(changePasswordError(e));
+ // This is thrown so that form can be cleared
+ // after a timeout on changePassword submit handler
+ throw e;
+ });
+};
diff --git a/src/containers/PasswordChangePage/PasswordChangePage.js b/src/containers/PasswordChangePage/PasswordChangePage.js
index ae582718..4a2f7ae1 100644
--- a/src/containers/PasswordChangePage/PasswordChangePage.js
+++ b/src/containers/PasswordChangePage/PasswordChangePage.js
@@ -48,8 +48,9 @@ export const PasswordChangePageComponent = props => {
},
];
- const changePasswordForm = currentUser && currentUser.id
- ? {
inProgress={changePasswordInProgress}
ready={passwordChanged}
/>
- : null;
+ ) : null;
return (
{
-
);
};
diff --git a/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.duck.js b/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.duck.js
index a2ec3b7c..59e6ad59 100644
--- a/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.duck.js
+++ b/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.duck.js
@@ -69,12 +69,11 @@ export const clearPasswordRecoveryError = () => ({ type: CLEAR_RECOVERY_ERROR })
// ================ Thunks ================ //
-export const recoverPassword = email =>
- (dispatch, getState, sdk) => {
- dispatch(passwordRecoveryRequest());
+export const recoverPassword = email => (dispatch, getState, sdk) => {
+ dispatch(passwordRecoveryRequest());
- return sdk.passwordReset
- .request({ email })
- .then(() => dispatch(passwordRecoverySuccess(email)))
- .catch(error => dispatch(passwordRecoveryError(error, email)));
- };
+ return sdk.passwordReset
+ .request({ email })
+ .then(() => dispatch(passwordRecoverySuccess(email)))
+ .catch(error => dispatch(passwordRecoveryError(error, email)));
+};
diff --git a/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.js b/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.js
index ea32296a..afc2e6f0 100644
--- a/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.js
+++ b/src/containers/PasswordRecoveryPage/PasswordRecoveryPage.js
@@ -68,9 +68,11 @@ export const PasswordRecoveryPageComponent = props => {
);
- const submittedEmailText = passwordRequested
- ?
@@ -86,12 +88,14 @@ export const PasswordRecoveryPageComponent = props => {
- {recoveryInProgress
- ?
- : }
+ {recoveryInProgress ? (
+
+ ) : (
+
+ )}
@@ -147,9 +151,7 @@ export const PasswordRecoveryPageComponent = props => {
return (
-
- {content}
-
+ {content}
);
};
diff --git a/src/containers/PasswordResetForm/PasswordResetForm.css b/src/containers/PasswordResetForm/PasswordResetForm.css
index 0ec86da0..65476586 100644
--- a/src/containers/PasswordResetForm/PasswordResetForm.css
+++ b/src/containers/PasswordResetForm/PasswordResetForm.css
@@ -1,7 +1,6 @@
@import '../../marketplace.css';
.root {
-
}
.password {
diff --git a/src/containers/PasswordResetPage/PasswordResetPage.css b/src/containers/PasswordResetPage/PasswordResetPage.css
index ed4f7b3f..b5af3658 100644
--- a/src/containers/PasswordResetPage/PasswordResetPage.css
+++ b/src/containers/PasswordResetPage/PasswordResetPage.css
@@ -16,7 +16,6 @@
@apply --marketplaceModalErrorStyles;
}
-
/* ================ Typography ================ */
/* Title of the modal */
diff --git a/src/containers/PasswordResetPage/PasswordResetPage.duck.js b/src/containers/PasswordResetPage/PasswordResetPage.duck.js
index 3fa8d2e7..46cb3ac0 100644
--- a/src/containers/PasswordResetPage/PasswordResetPage.duck.js
+++ b/src/containers/PasswordResetPage/PasswordResetPage.duck.js
@@ -40,12 +40,15 @@ export const resetPasswordError = e => ({
// ================ Thunks ================ //
-export const resetPassword = (email, passwordResetToken, newPassword) =>
- (dispatch, getState, sdk) => {
- dispatch(resetPasswordRequest());
- const params = { email, passwordResetToken, newPassword };
- return sdk.passwordReset
- .reset(params)
- .then(() => dispatch(resetPasswordSuccess()))
- .catch(e => dispatch(resetPasswordError(e)));
- };
+export const resetPassword = (email, passwordResetToken, newPassword) => (
+ dispatch,
+ getState,
+ sdk
+) => {
+ dispatch(resetPasswordRequest());
+ const params = { email, passwordResetToken, newPassword };
+ return sdk.passwordReset
+ .reset(params)
+ .then(() => dispatch(resetPasswordSuccess()))
+ .catch(e => dispatch(resetPasswordError(e)));
+};
diff --git a/src/containers/PasswordResetPage/PasswordResetPage.js b/src/containers/PasswordResetPage/PasswordResetPage.js
index 3dbab202..f3c75574 100644
--- a/src/containers/PasswordResetPage/PasswordResetPage.js
+++ b/src/containers/PasswordResetPage/PasswordResetPage.js
@@ -71,11 +71,11 @@ export class PasswordResetPageComponent extends Component {
- {resetPasswordError
- ?
-
-
- : null}
+ {resetPasswordError ? (
+
+
+
+ ) : null}
-
- {content}
-
+ {content}
);
}
diff --git a/src/containers/PayoutDetailsForm/PayoutDetailsForm.css b/src/containers/PayoutDetailsForm/PayoutDetailsForm.css
index e725ff3b..6644139c 100644
--- a/src/containers/PayoutDetailsForm/PayoutDetailsForm.css
+++ b/src/containers/PayoutDetailsForm/PayoutDetailsForm.css
@@ -1,7 +1,6 @@
@import '../../marketplace.css';
.root {
-
}
.sectionContainer {
diff --git a/src/containers/PayoutDetailsForm/PayoutDetailsForm.js b/src/containers/PayoutDetailsForm/PayoutDetailsForm.js
index 5dd280f6..da0912b3 100644
--- a/src/containers/PayoutDetailsForm/PayoutDetailsForm.js
+++ b/src/containers/PayoutDetailsForm/PayoutDetailsForm.js
@@ -129,76 +129,75 @@ const PayoutDetailsFormComponent = props => {
);
const showAddressFields = country && requiresAddress(country);
- const addressSection = showAddressFields
- ?
+ const addressSection = showAddressFields ? (
+
+ ) : null;
// StripeBankAccountTokenInputField handles the error messages
// internally, we just have to make sure we require a valid token
// out of the field. Therefore the empty validation message.
const bankAccountRequired = validators.required(' ');
- const bankAccountSection = country
- ?
-
-
-
-
-
- : null;
+ const bankAccountSection = country ? (
+
+
+
+
+
+
+ ) : null;
const classes = classNames(css.root, className);
const submitReady = false;
const submitInProgress = submitting || inProgress;
const submitDisabled = pristine || invalid || disabled || submitInProgress;
- const error = createStripeAccountError
- ?
-
-
- : null;
+ const error = createStripeAccountError ? (
+
+
+
+ ) : null;
return (