mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
20 lines
782 B
JavaScript
20 lines
782 B
JavaScript
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.journal.sheets, query),
|
|
getJournalSheet: (index) => getFinancialSheet(state.financialStatements.journal.sheets, index),
|
|
journalSheetLoading: state.financialStatements.journal.loading,
|
|
});
|
|
|
|
export const mapDispatchToProps = (dispatch) => ({
|
|
fetchJournalSheet: (query) => dispatch(fetchJournalSheet({ query })),
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps); |