mirror of
https://github.com/vercel/commerce.git
synced 2025-07-24 18:51:23 +00:00
assets
components
config
lib
bigcommerce
api
cart
catalog
definitions
fragments
operations
utils
create-api-handler.ts
errors.ts
fetch-graphql-api.ts
fetch-store-api.ts
filter-edges.ts
get-cart-cookie.ts
is-allowed-method.ts
parse-item.ts
types.ts
checkout.ts
customers.ts
index.ts
cart
products
scripts
index.tsx
schema.d.ts
schema.graphql
use-price.tsx
commerce
to-pixels.ts
pages
public
utils
.gitignore
.prettierignore
README.md
codegen.json
global.d.ts
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
10 lines
198 B
TypeScript
10 lines
198 B
TypeScript
import type { ItemBody } from '../cart'
|
|
|
|
const parseItem = (item: ItemBody) => ({
|
|
quantity: item.quantity,
|
|
product_id: item.productId,
|
|
variant_id: item.variantId,
|
|
})
|
|
|
|
export default parseItem
|