feat: Optimize connect component props with redux store.

This commit is contained in:
Ahmed Bouhuolia
2020-05-10 02:14:42 +02:00
parent e590a21740
commit a0653674ff
58 changed files with 660 additions and 460 deletions

View File

@@ -76,13 +76,16 @@ const NoteCellRenderer = (chainedComponent) => (props) => {
/**
* Make journal entries table component.
*/
function MakeJournalEntriesTable({
formik: { errors, values, setFieldValue },
function MakeJournalEntriesTable({
// #withAccounts
accounts,
// #ownPorps
onClickRemoveRow,
onClickAddNewRow,
defaultRow,
initialValues,
formik: { errors, values, setFieldValue },
}) {
const [rows, setRow] = useState([]);
@@ -226,5 +229,7 @@ function MakeJournalEntriesTable({
}
export default compose(
withAccounts,
withAccounts(({ accounts }) => ({
accounts,
})),
)(MakeJournalEntriesTable);