WIP item categories.

This commit is contained in:
elforjani3
2020-03-30 14:28:54 +02:00
parent 6c4f86431c
commit f7b8c57532
12 changed files with 355 additions and 26 deletions

View File

@@ -0,0 +1,24 @@
//FIXME: FIX Later Need More Work
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 mapDispatchToProps = dispatch => ({
submitItemCategory: form => dispatch(submitItemCategory({ form })),
submitCategory: form => dispatch(submitCategory({ form })),
fetchCategory: () => dispatch(fetchCategory())
});
export default connect(mapStateToProps, mapDispatchToProps);