woocommerce/packages/woocommerce-blocks/build/atomic-block-components/category-list-frontend.js

1 line
845 B
JavaScript

(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{365:function(e,t){},392:function(e,t,c){"use strict";c.r(t);var a=c(4),n=c.n(a),o=c(1),r=(c(10),c(6)),s=c.n(r),l=c(101),u=c(7),i=c(249);c(365),t.default=Object(i.withProductDataContext)((function(e){var t=e.className,c=Object(l.useInnerBlockLayoutContext)().parentClassName,a=Object(l.useProductDataContext)().product;return Object(u.isEmpty)(a.categories)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-category-list",n()({},"".concat(c,"__product-category-list"),c))},Object(o.__)("Categories:",'woocommerce')," ",React.createElement("ul",null,Object.values(a.categories).map((function(e){var t=e.name,c=e.link,a=e.slug;return React.createElement("li",{key:"category-list-item-".concat(a)},React.createElement("a",{href:c},t))}))))}))}}]);