From 02925f8866821ebd8eb78af7c368fcbad197ab40 Mon Sep 17 00:00:00 2001 From: Senad Uka Date: Sun, 8 Feb 2015 15:18:15 +0100 Subject: [PATCH] created cart icon with number of items notification - it's still buggy --- front-ui/app/components/cart/cartIcon.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/front-ui/app/components/cart/cartIcon.js b/front-ui/app/components/cart/cartIcon.js index cb02be9..a4f933c 100644 --- a/front-ui/app/components/cart/cartIcon.js +++ b/front-ui/app/components/cart/cartIcon.js @@ -38,6 +38,10 @@ var CartIcon = React.createClass({ if (this.isMounted()) { this.setState(CartStore.getWholeCartState()); } + }, + + componentWillUnmount: function () { + CartStore.removeChangeListener(this._onChange); }