Files
old-web/frontend-react/src/utils/subcategorywrapper.js

20 lines
427 B
JavaScript
Raw Normal View History

import { connect } from "react-redux";
import { SUBCATEGORY_SELECT } from "constants/actionTypes";
const mapStateToProps = state => {
return {
subcategory: state.subcategory
};
};
const mapDispatchToProps = dispatch => ({
onSubCategoryChanged: option =>
dispatch({ type: SUBCATEGORY_SELECT, option })
});
export const subcategorywrapper = component =>
connect(
mapStateToProps,
mapDispatchToProps
)(component);