@hanzo/commerce 1.1.7 → 1.1.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/commerce",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Library with shopping cart components.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
package/util/index.ts CHANGED
@@ -18,11 +18,14 @@ export function unslugify(str: string) {
18
18
  return str.replace(/-/g, ' ')
19
19
  }
20
20
 
21
+
21
22
  export function formatPrice(price: number): string {
22
- return price.toLocaleString('en-US', {
23
+ const str = price.toLocaleString('en-US', {
23
24
  style: 'currency',
24
25
  currency: 'USD',
25
26
  });
27
+ return (str.endsWith('.00')) ? str.replace('.00', '') : str
26
28
  }
27
29
 
30
+
28
31
  export { default as useSyncSkuParamWithCurrentItem } from './use-sync-sku-param-w-current-item'
@@ -11,7 +11,7 @@ import {
11
11
  import { useCommerce } from '../service/context'
12
12
  import type { FacetsValue } from '../types'
13
13
 
14
- const PLEASE_SELECT_FACETS = 'Please select an option from each group above.'
14
+ const PLEASE_SELECT_FACETS = 'Please select an option from each group.'
15
15
 
16
16
  const useSyncSkuParamWithCurrentItem = (
17
17
  categoryLevel: number,