Skip to content

Commit

Permalink
chore: resolve various prop validation errors
Browse files Browse the repository at this point in the history
Signed-off-by: Will Lopez <[email protected]>
  • Loading branch information
willopez committed Sep 26, 2019
1 parent 86819f4 commit 47f4a9a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class OrderCardFulfillmentGroup extends Component {

static defaultProps = {
hasMoreCartItems: false,
loadMoreCartItems() {},
onChangeCartItemsQuantity() {},
onRemoveCartItems() {}
loadMoreCartItems() { },
onChangeCartItemsQuantity() { },
onRemoveCartItems() { }
}

handleItemQuantityChange = (quantity, cartItemId) => {
Expand Down Expand Up @@ -103,7 +103,7 @@ class OrderCardFulfillmentGroup extends Component {
spacing={24}
>
<Grid item xs={6}>
<Typography className={classes.fulfillmentGroupCount} variant="subheading">Shipment {currentGroupCount} of {totalGroupsCount}</Typography>
<Typography className={classes.fulfillmentGroupCount} variant="subtitle1">Shipment {currentGroupCount} of {totalGroupsCount}</Typography>
</Grid>
<Grid item xs={6} className={classes.fulfillmentGroupHeaderRightColumn}>
{fulfillmentGroup.tracking ?
Expand Down
8 changes: 4 additions & 4 deletions src/components/OrderCardHeader/OrderCardHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ class OrderCardHeader extends Component {

// If more than one payment method, display amount for each
if (Array.isArray(payments) && payments.length > 1) {
return payments.map((payment) => <Typography variant="caption">{payment.displayName} {payment.amount.displayAmount}</Typography>);
return payments.map((payment, index) => <Typography key={index} variant="caption">{payment.displayName} {payment.amount.displayAmount}</Typography>);
}

// If only one payment method, do not display amount
return payments.map((payment) => <Typography variant="caption">{payment.displayName}</Typography>);
return payments.map((payment, index) => <Typography key={index} variant="caption">{payment.displayName}</Typography>);
}

renderOrderShipments() {
const { order: { fulfillmentGroups } } = this.props;

if (Array.isArray(fulfillmentGroups) && fulfillmentGroups.length) {
return fulfillmentGroups.map((fulfillmentGroup) => <Typography variant="caption">{fulfillmentGroup.selectedFulfillmentOption.fulfillmentMethod.carrier} - {fulfillmentGroup.selectedFulfillmentOption.fulfillmentMethod.displayName}</Typography>); // eslint-disable-line
return fulfillmentGroups.map((fulfillmentGroup, index) => <Typography key={index} variant="caption">{fulfillmentGroup.selectedFulfillmentOption.fulfillmentMethod.carrier} - {fulfillmentGroup.selectedFulfillmentOption.fulfillmentMethod.displayName}</Typography>); // eslint-disable-line
}

return null;
Expand Down Expand Up @@ -167,7 +167,7 @@ class OrderCardHeader extends Component {
</Grid>
</Grid>
</section>
: null }
: null}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfileAddressBook/ProfileAddressBook.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ProfileAddressBook extends Component {
return (
<Grid className={classes.profileAddressBookContainer} container>
<Grid className={classes.profileAddressBookTitle} item xs={12} md={12}>
<Typography variant="title">Address Book</Typography>
<Typography variant="h6">Address Book</Typography>
</Grid>
{this.renderAddressBook()}
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfileOrders/ProfileOrders.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ProfileOrders extends Component {
return (
<Grid className={classes.profileOrdersContainer} container>
<Grid className={classes.profileOrdersTitle} item xs={12} md={12}>
<Typography variant="title">Orders</Typography>
<Typography variant="h6">Orders</Typography>
</Grid>
<Grid className={classes.profileOrdersSelect} item xs={12} md={12}>
{this.renderOrderTypeSelect()}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/checkoutComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class CheckoutComplete extends Component {
<Grid item xs={false} md={3} /> {/* MUI grid doesn't have an offset. Use blank grid item instead. */}
<Grid item xs={12} md={6}>
<Grid item className={classes.orderThankYou} xs={12} md={12}>
<Typography className={classes.title} variant="title">Thank you for your order</Typography>
<Typography className={classes.title} variant="h6">Thank you for your order</Typography>
<Typography variant="body1">
{"Your order ID is:"} <strong>{order.referenceId}</strong>
</Typography>
Expand Down

0 comments on commit 47f4a9a

Please sign in to comment.