mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Normalizing Cart Responses
This commit is contained in:
@@ -3,11 +3,6 @@ export type SelectedOptions = {
|
||||
color: string | null
|
||||
}
|
||||
|
||||
export type ProductOption = {
|
||||
displayName: string
|
||||
values: any
|
||||
}
|
||||
|
||||
export function getVariant(product: Product, opts: SelectedOptions) {
|
||||
const variant = product.variants.find((variant) => {
|
||||
return Object.entries(opts).every(([key, value]) =>
|
||||
|
Reference in New Issue
Block a user