20 lines
427 B
JavaScript
20 lines
427 B
JavaScript
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);
|