mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
WIP
This commit is contained in:
19
client/src/connectors/Journal.connect.js
Normal file
19
client/src/connectors/Journal.connect.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {
|
||||
fetchJournalSheet
|
||||
} from 'store/financialStatement/financialStatements.actions';
|
||||
import {
|
||||
getFinancialSheetIndexByQuery,
|
||||
getFinancialSheet,
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
getJournalSheetIndex: (query) => getFinancialSheetIndexByQuery(state.financialStatements.journalSheets, query),
|
||||
getJournalSheet: (index) => getFinancialSheet(state.financialStatements.journalSheets, index),
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
fetchJournalSheet: (query) => dispatch(fetchJournalSheet({ query })),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
Reference in New Issue
Block a user