Skip to content

Commit 1b9233c

Browse files
Clean up code not being used
1 parent 959309b commit 1b9233c

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

src/components/businesses/BusinessProduct.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import React, { Component } from 'react';
22
import { connect } from 'react-redux'
33
import { Link } from 'react-router-dom'
4-
import { deleteProduct, fetchProducts } from '../../actions/product'
5-
import { fetchColors} from '../../actions/color'
4+
import { deleteProduct } from '../../actions/product'
65
import { Redirect } from 'react-router-dom'
7-
import ProductColors from '../products/ProductColors.js'
86
import ProductsContainer from '../../containers/ProductsContainer'
97

108

@@ -16,13 +14,6 @@ class BusinessProduct extends Component {
1614
}
1715

1816

19-
// componentDidMount() {
20-
// this.props.fetchProducts()
21-
// // this.props.fetchColors()
22-
// }
23-
24-
25-
2617
handleDelete = (productId) => {
2718
let businessId = this.props.product.business_id;
2819
this.props.deleteProduct(productId, businessId);
@@ -88,4 +79,4 @@ const mapStateToProps = state => {
8879
};
8980
}
9081

91-
export default connect(mapStateToProps, { fetchProducts, fetchColors, deleteProduct })(BusinessProduct);
82+
export default connect(mapStateToProps, { deleteProduct })(BusinessProduct);

src/components/products/ProductColors.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class ProductColors extends Component {
99
super(props);
1010

1111
console.log("Colors props", this.props);
12-
13-
1412
}
1513

1614
handleColorDelete = (colorId) => {

src/containers/BusinessesContainer.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ import React, { Component } from 'react';
22
import {connect} from 'react-redux'
33
import { fetchBusinesses } from "../actions/userBusiness.js"
44
import Businesses from '../components/businesses/Businesses.js'
5-
import { fetchColors } from "../actions/color.js"
65

76
class BusinessesContainer extends Component {
87
state = { }
98

109
componentDidMount() {
1110
this.props.fetchBusinesses()
12-
// this.props.fetchColors()
1311
}
1412

1513
render() {
@@ -30,4 +28,4 @@ const mapStateToProps = state => {
3028
};
3129
}
3230

33-
export default connect(mapStateToProps, { fetchBusinesses, fetchColors })(BusinessesContainer);
31+
export default connect(mapStateToProps, { fetchBusinesses })(BusinessesContainer);

0 commit comments

Comments
 (0)