feat: enhance PaymentConfigPage with refetch and loading state for license types

This commit is contained in:
estifanos
2026-08-12 07:37:19 +00:00
parent bbb23f3bbf
commit 362e6d88b4

View File

@@ -59,7 +59,8 @@ function feeText(amount: string | number | null, currency: string): string {
}
export function PaymentConfigPage() {
const { data, isLoading, error } = useGetLicenseTypesQuery();
const { data, isLoading, isFetching, error, refetch } =
useGetLicenseTypesQuery();
const { data: capabilities } = useGetPaymentCapabilitiesQuery();
const [editing, setEditing] = useState<LicenseType | null>(null);
const { setPageIndex, pageSize, setPageSize, paginate } = useServerTable();
@@ -211,6 +212,8 @@ export function PaymentConfigPage() {
onPageChange={setPageIndex}
pageSize={pageSize}
onPageSizeChange={setPageSize}
refresh={refetch}
isLoading={isFetching}
/>
<GatewayPanel bypassEnabled={capabilities?.bypassEnabled} />