summaryrefslogtreecommitdiffstats
path: root/frontend/components/ToggleCart.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/components/ToggleCart.js')
-rw-r--r--frontend/components/ToggleCart.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/frontend/components/ToggleCart.js b/frontend/components/ToggleCart.js
deleted file mode 100644
index c80baa6..0000000
--- a/frontend/components/ToggleCart.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Component } from 'react';
-import { compose } from 'react-apollo';
-import { uiEnhancer, updateUIEnhancer } from '../enhancers/enhancers';
-import PropTypes from 'prop-types';
-
-class ToggleCart extends Component {
- static propTypes = {
- render: PropTypes.func.isRequired,
- toggleCart: PropTypes.func.isRequired,
- ui: PropTypes.object.isRequired,
- };
- toggle = e => {
- // if this is a keyPress event, make sure it's the enter key
- if (e.keyCode && e.keyCode !== 16) return;
- this.props.toggleCart(!this.props.ui.uiData.isCartOpen);
- };
- render() {
- return this.props.render(this.toggle);
- }
-}
-
-export default compose(uiEnhancer, updateUIEnhancer)(ToggleCart);