@sonic-equipment/ui 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6045,7 +6045,8 @@ const categories = Array.from({ length: 20 }, () => ({
6045
6045
  function ProductListingPage({ category, isLoading = false, }) {
6046
6046
  const { toggle } = useSidebar();
6047
6047
  const { hits: productHits } = useHits();
6048
- return (jsxs(Page, { className: styles$1['product-listing'], title: category.slice().pop(), children: [categories?.length > 0 && (jsx("section", { className: styles$1.categories, children: jsx(CategoryCarousel, { categories: categories }) })), jsxs("section", { className: styles$1['action-bar'], children: [jsx(ToggleSidebarButton, {}), jsx("span", { className: styles$1.count, children: jsx(AlgoliaResultsCount, {}) }), jsx(AlgoliaSortBy, {})] }), jsx("section", { children: isLoading ? (jsx("p", { children: "Loading..." })) : (jsxs("div", { className: styles$1['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { onShowProducts: toggle }) }), jsxs("div", { className: styles$1['product-grid'], children: [jsx(ProductOverviewGrid, { children: productHits.map(productHit => (jsx(ConnectedProductCart, { href: `${location.href}/${productHit.id}-${productHit.name.replace(/ /g, '-')}`, image: {
6048
+ const baseUrl = location.href.split('?')[0];
6049
+ return (jsxs(Page, { className: styles$1['product-listing'], title: category.slice().pop(), children: [categories?.length > 0 && (jsx("section", { className: styles$1.categories, children: jsx(CategoryCarousel, { categories: categories }) })), jsxs("section", { className: styles$1['action-bar'], children: [jsx(ToggleSidebarButton, {}), jsx("span", { className: styles$1.count, children: jsx(AlgoliaResultsCount, {}) }), jsx(AlgoliaSortBy, {})] }), jsx("section", { children: isLoading ? (jsx("p", { children: "Loading..." })) : (jsxs("div", { className: styles$1['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { onShowProducts: toggle }) }), jsxs("div", { className: styles$1['product-grid'], children: [jsx(ProductOverviewGrid, { children: productHits.map(productHit => (jsx(ConnectedProductCart, { href: `${baseUrl}${baseUrl.endsWith('/') ? '' : '/'}${productHit.id}-${productHit.name.replace(/ /g, '-')}`, image: {
6049
6050
  alt: productHit.name,
6050
6051
  fit: 'contain',
6051
6052
  sizes: { lg: 288, md: 204, sm: 122 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {