mirror of
https://github.com/vercel/commerce.git
synced 2025-07-24 10:41:23 +00:00
BigCommerce custom fields
This commit is contained in:
@@ -83,8 +83,8 @@ export const getMetafieldValue = (
|
||||
case 'weight':
|
||||
return getMeasurment(value, locale)
|
||||
case 'rating':
|
||||
const { scale_max, value: val } = JSON.parse(value)
|
||||
return Array.from({ length: scale_max }, (_, i) =>
|
||||
const { scale_max: length, value: val } = JSON.parse(value)
|
||||
return Array.from({ length }, (_, i) =>
|
||||
i <= val - 1 ? '★' : '☆'
|
||||
).join('')
|
||||
case 'color':
|
||||
|
Reference in New Issue
Block a user