feat: style read-only drawers.

fix: empty state in resources tables.
This commit is contained in:
a.bouhuolia
2021-08-24 14:57:19 +02:00
parent f5fd2aa324
commit af34986aac
143 changed files with 1530 additions and 915 deletions

View File

@@ -20,25 +20,23 @@ import { compose, transformTableStateToQuery } from 'utils';
function PaymentMadeList({
// #withPaymentMades
paymentMadesTableState,
paymentsTableStateChanged,
// #withPaymentMadeActions
setPaymentMadesTableState
resetPaymentMadesTableState,
}) {
// Resets the invoices table state once the page unmount.
React.useEffect(
() => () => {
setPaymentMadesTableState({
filterRoles: [],
viewSlug: '',
pageIndex: 0,
});
resetPaymentMadesTableState();
},
[setPaymentMadesTableState],
[resetPaymentMadesTableState],
);
return (
<PaymentMadesListProvider
query={transformTableStateToQuery(paymentMadesTableState)}
tableStateChanged={paymentsTableStateChanged}
>
<PaymentMadeActionsBar />
@@ -56,8 +54,9 @@ function PaymentMadeList({
}
export default compose(
withPaymentMades(({ paymentMadesTableState }) => ({
withPaymentMades(({ paymentMadesTableState, paymentsTableStateChanged }) => ({
paymentMadesTableState,
paymentsTableStateChanged,
})),
withPaymentMadeActions
withPaymentMadeActions,
)(PaymentMadeList);