mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
WIP
This commit is contained in:
25
client/src/connectors/View.connector.js
Normal file
25
client/src/connectors/View.connector.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {
|
||||
fetchView,
|
||||
submitView,
|
||||
deleteView,
|
||||
editView,
|
||||
} from 'store/customViews/customViews.actions';
|
||||
import {
|
||||
getViewMeta,
|
||||
getViewItem,
|
||||
} from 'store/customViews/customViews.selectors';
|
||||
|
||||
export const mapStateToProps = (state) => ({
|
||||
getViewMeta: (viewId) => getViewMeta(state, viewId),
|
||||
getViewItem: (viewId) => getViewItem(state, viewId),
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
fetchView: (id) => dispatch(fetchView({ id })),
|
||||
submitView: (form) => dispatch(submitView({ form })),
|
||||
editView: (id, form) => dispatch(editView({ id, form })),
|
||||
deleteView: (id) => dispatch(deleteView({ id })),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
Reference in New Issue
Block a user