@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
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
|
-
|
|
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
|
|
14
|
+
const PLEASE_SELECT_FACETS = 'Please select an option from each group.'
|
|
15
15
|
|
|
16
16
|
const useSyncSkuParamWithCurrentItem = (
|
|
17
17
|
categoryLevel: number,
|