Skip to content

Commit

Permalink
Adjust blocks URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferri0 committed Dec 4, 2024
1 parent 1b09570 commit 1445449
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blocks/commerce-order-returns/commerce-order-returns.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ export default async function decorate(block) {

return `${returnDetailsPath}?orderRef=${encodedOrderRef}&returnRef=${returnNumber}`;
},
routeProductDetails: (productData) => (productData ? `/products/${productData.product.urlKey}/${productData.product.sku}` : '#'),
routeProductDetails: (productData) => (productData?.product ? `/products/${productData.product.urlKey}/${productData.product.sku}` : '#'),
})(block);
}
2 changes: 1 addition & 1 deletion blocks/commerce-orders-list/commerce-orders-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default async function decorate(block) {
routeOrdersList: () => CUSTOMER_ORDERS_PATH,
routeOrderDetails: (orderNumber) => `${CUSTOMER_ORDER_DETAILS_PATH}?orderRef=${orderNumber}`,
routeReturnDetails: ({ orderNumber, returnNumber }) => `${CUSTOMER_RETURN_DETAILS_PATH}?orderRef=${orderNumber}&returnRef=${returnNumber}`,
routeOrderProduct: (productData) => (productData ? `/products/${productData.product.urlKey}/${productData.product.sku}` : '#'),
routeOrderProduct: (productData) => (productData?.product ? `/products/${productData.product.urlKey}/${productData.product.sku}` : '#'),
})(block);
}
}
2 changes: 1 addition & 1 deletion blocks/commerce-returns-list/commerce-returns-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async function decorate(block) {
routeReturnDetails: ({ orderNumber, returnNumber }) => `${CUSTOMER_RETURN_DETAILS_PATH}?orderRef=${orderNumber}&returnRef=${returnNumber}`,
routeOrderDetails: ({ orderNumber }) => `${CUSTOMER_ORDER_DETAILS_PATH}?orderRef=${orderNumber}`,
routeReturnsList: () => CUSTOMER_RETURNS_PATH,
routeProductDetails: (productData) => (productData ? `/products/${productData.product.urlKey}/${productData.product.sku}` : '#'),
routeProductDetails: (productData) => (productData?.product ? `/products/${productData.product.urlKey}/${productData.product.sku}` : '#'),
})(block);
}
}

0 comments on commit 1445449

Please sign in to comment.