Fix & connectors folder

This commit is contained in:
elforjani3
2020-06-01 19:21:47 +02:00
parent c1659d191f
commit e1f56c873b
51 changed files with 665 additions and 632 deletions

View File

@@ -1,24 +1,23 @@
//FIXME: FIX Later Need More Work
import { connect } from 'react-redux';
import {
submitItemCategory,
submitCategory,
fetchCategory
} from 'store/itemCategories/itemsCategory.actions';
// import { connect } from 'react-redux';
// import {
// submitItemCategory,
// submitCategory,
// fetchCategory
// } from 'store/itemCategories/itemsCategory.actions';
export const mapStateToProps = (state, props) => {
return {
category: state.category,
name: 'item-form',
payload: { action: 'new', id: null }
};
};
// export const mapStateToProps = (state, props) => {
// return {
// category: state.category,
// name: 'item-form',
// payload: { action: 'new', id: null }
// };
// };
export const mapDispatchToProps = dispatch => ({
submitItemCategory: form => dispatch(submitItemCategory({ form })),
submitCategory: form => dispatch(submitCategory({ form })),
fetchCategory: () => dispatch(fetchCategory())
});
// export const mapDispatchToProps = dispatch => ({
// submitItemCategory: form => dispatch(submitItemCategory({ form })),
// submitCategory: form => dispatch(submitCategory({ form })),
// fetchCategory: () => dispatch(fetchCategory())
// });
export default connect(mapStateToProps, mapDispatchToProps);
// export default connect(mapStateToProps, mapDispatchToProps);