diff options
author | Sebastian <sebasjm@gmail.com> | 2024-04-05 10:30:19 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-04-05 10:30:34 -0300 |
commit | 70151490bd79d38f8064b720fc124d1774a18235 (patch) | |
tree | 3d3238bf02743d38b243581457130804939f0473 /packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/Table.tsx | |
parent | 493fe38a603cc7a54a9d36b235da7abad3a10a92 (diff) | |
download | wallet-core-70151490bd79d38f8064b720fc124d1774a18235.tar.xz |
fix listing, add cache invalidation, fix codec for accounts
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/Table.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/Table.tsx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/Table.tsx index 2cafc7f9a..919285e78 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/Table.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/Table.tsx @@ -32,8 +32,6 @@ interface Props { onSelect: (e: Entity) => void; onCreate: () => void; onLoadMoreBefore?: () => void; - hasMoreBefore?: boolean; - hasMoreAfter?: boolean; onLoadMoreAfter?: () => void; } @@ -44,8 +42,6 @@ export function CardTable({ onSelect, onLoadMoreAfter, onLoadMoreBefore, - hasMoreAfter, - hasMoreBefore, }: Props): VNode { const [rowSelection, rowSelectionHandler] = useState<string[]>([]); @@ -85,8 +81,6 @@ export function CardTable({ rowSelectionHandler={rowSelectionHandler} onLoadMoreAfter={onLoadMoreAfter} onLoadMoreBefore={onLoadMoreBefore} - hasMoreAfter={hasMoreAfter} - hasMoreBefore={hasMoreBefore} /> ) : ( <EmptyTable /> @@ -104,8 +98,6 @@ interface TableProps { onSelect: (e: Entity) => void; rowSelectionHandler: StateUpdater<string[]>; onLoadMoreBefore?: () => void; - hasMoreBefore?: boolean; - hasMoreAfter?: boolean; onLoadMoreAfter?: () => void; } @@ -115,19 +107,17 @@ function Table({ onDelete, onSelect, onLoadMoreBefore, - hasMoreAfter, - hasMoreBefore, }: TableProps): VNode { const { i18n } = useTranslationContext(); return ( <div class="table-container"> - {hasMoreBefore && ( + {onLoadMoreBefore && ( <button class="button is-fullwidth" data-tooltip={i18n.str`load more webhooks before the first one`} onClick={onLoadMoreBefore} > - <i18n.Translate>load newer webhooks</i18n.Translate> + <i18n.Translate>load first page</i18n.Translate> </button> )} <table class="table is-fullwidth is-striped is-hoverable is-fullwidth"> @@ -181,13 +171,13 @@ function Table({ })} </tbody> </table> - {hasMoreAfter && ( + {onLoadMoreAfter && ( <button class="button is-fullwidth" data-tooltip={i18n.str`load more webhooks after the last one`} onClick={onLoadMoreAfter} > - <i18n.Translate>load older webhooks</i18n.Translate> + <i18n.Translate>load next page</i18n.Translate> </button> )} </div> |