Skip to content

Commit

Permalink
- Fix translation
Browse files Browse the repository at this point in the history
- Fix error display
  • Loading branch information
Esther Falayi authored and Esther Falayi committed Oct 25, 2017
1 parent 214c958 commit 8ab74e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ function getOrders() {
Template.userOrdersList.helpers({
hasData(data) {
if (data.hash.data) {
return data.hash.data;
if (data.hash.data.count() > 0) {
return true;
}
return false;
}
return true;
return false;
},

// Returns React Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ import ShopOrderSummary from "./shopOrderSummary";
* @return {Node} React node containing the order summary broken down by shop
*/
const CompletedOrderSummary = ({ shops, orderSummary, isProfilePage }) => {
const title = isProfilePage ? "Order Summary" : "Your Items";
return (
<div>
<div className="order-details-content-title">
<p><Components.Translation defaultValue={title} i18nKey={title || "cartCompleted.yourCart"} /></p>
<p><Components.Translation defaultValue="Order Summary" i18nKey={"cartCompleted.orderSummary"} /></p>
</div>
<div className="order-details-info-box">
{shops.map((shop) => {
Expand Down
2 changes: 1 addition & 1 deletion imports/plugins/core/checkout/server/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"limitedSupply": "Limited supply"
},
"cartCompleted": {
"yourCart": "Your Cart",
"orderSummary": "Order Summary",
"discountTotal": "Discount Total",
"orderTotal": "Order Total",
"fulfilledBy": "Fulfilled by",
Expand Down

0 comments on commit 8ab74e0

Please sign in to comment.