refactoring: migrating to react-query to manage service-side state.

This commit is contained in:
a.bouhuolia
2021-02-07 08:10:21 +02:00
parent e093be0663
commit adac2386bb
284 changed files with 8255 additions and 6610 deletions

View File

@@ -11,13 +11,7 @@ import {
PercentFieldCell,
DivFieldCell,
} from 'components/DataTableCells';
import withItems from 'containers/Items/withItems';
import {
compose,
formattedAmount,
saveInvoke,
} from 'utils';
import { formattedAmount, saveInvoke } from 'utils';
// Actions cell renderer component.
const ActionsCellRenderer = ({
@@ -77,11 +71,9 @@ const ItemHeaderCell = () => (
</>
);
function ItemsEntriesTable({
//#withitems
itemsCurrentPage,
export default function ItemsEntriesTable({
//#ownProps
items,
entries,
errors,
onUpdateData,
@@ -229,7 +221,7 @@ function ItemsEntriesTable({
rowClassNames={rowClassNames}
sticky={true}
payload={{
items: itemsCurrentPage,
items,
errors: errors || [],
updateData: handleUpdateData,
removeRow: handleRemoveRow,
@@ -257,9 +249,3 @@ function ItemsEntriesTable({
/>
);
}
export default compose(
withItems(({ itemsCurrentPage }) => ({
itemsCurrentPage,
})),
)(ItemsEntriesTable);