Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arcteryx/components-cart

Package Overview
Dependencies
Maintainers
7
Versions
940
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcteryx/components-cart - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [4.1.2](http://bitbucket.org/arcteryx/arcteryx-js-helpers/compare/@arcteryx/components-cart@4.1.1...@arcteryx/components-cart@4.1.2) (2020-11-24)
### Bug Fixes
* TMS-699 use Product model for increase/descrese/set quantity ([e04e5ab](http://bitbucket.org/arcteryx/arcteryx-js-helpers/commits/e04e5ab495c0702b063dc7d557d557228f4f7ff0))
## [4.1.1](http://bitbucket.org/arcteryx/arcteryx-js-helpers/compare/@arcteryx/components-cart@4.1.0...@arcteryx/components-cart@4.1.1) (2020-11-18)

@@ -8,0 +19,0 @@

4

package.json
{
"name": "@arcteryx/components-cart",
"version": "4.1.1",
"version": "4.1.2",
"description": "Arcteryx Cart",

@@ -18,3 +18,3 @@ "source": "src/index.js",

"license": "ISC",
"gitHead": "47c985af2a405f2643220bf6da3385686558ad24",
"gitHead": "9edbcc80a5aa563bc8b1825ab0a379c223d323cc",
"peerDependencies": {

@@ -21,0 +21,0 @@ "@arcteryx/components-contexts": "^1.1.0",

import { Button } from "@arcteryx/components-button";
import { TasCart } from '@arcteryx/data-models';
import { TasCart, Product as ProductModel } from '@arcteryx/data-models';
import React, { useState } from "react";

@@ -33,2 +33,9 @@ import styled from "styled-components";

const [prod, setProduct] = useState(product);
const updateProductQuantity = (quantity) => {
let clone = new ProductModel({...prod});
clone.quantity = Number(quantity);
setProduct(clone);
}
return (

@@ -41,5 +48,5 @@ <CartProduct

isFlyIn={isFlyIn}
handleIncrement={() => setProduct({ ...prod, quantity: prod.quantity + 1 })}
handleDecrement={() => setProduct({ ...prod, quantity: prod.quantity - 1 })}
handleChange={val => setProduct({ ...prod, quantity: val })}
handleIncrement={() => updateProductQuantity(prod.quantity + 1)}
handleDecrement={() => updateProductQuantity(prod.quantity - 1)}
handleChange={val => updateProductQuantity(val)}
handleRemove={() => setProduct(null)}

@@ -46,0 +53,0 @@ />

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc