mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
btc wizard
This commit is contained in:
@@ -236,10 +236,21 @@ export function SeamanBookPage({
|
|||||||
const isBtc = service === "BTC";
|
const isBtc = service === "BTC";
|
||||||
const isCombined = service === "COMBINED";
|
const isCombined = service === "COMBINED";
|
||||||
|
|
||||||
const { data, isLoading, refetch } = useApiQuery<SeamanBookOverview>({
|
// Polled, not fetch-once: the officer who claims/reviews/approves this
|
||||||
url: "/seaman-book/my",
|
// application (and the auto-promotion when the parent seafarer
|
||||||
method: "GET",
|
// registration is approved) all happen in a different session, so nothing
|
||||||
});
|
// in this tab would otherwise tell RTK Query the status changed underneath
|
||||||
|
// it — the applicant would see a stale "Draft"/"Payment Pending" until they
|
||||||
|
// manually reloaded. `useApiQuery` is a generic untagged passthrough (many
|
||||||
|
// unrelated callers share it), so polling this one call is the fix that
|
||||||
|
// doesn't risk over-invalidating everyone else's cache.
|
||||||
|
const { data, isLoading, refetch } = useApiQuery<SeamanBookOverview>(
|
||||||
|
{
|
||||||
|
url: "/seaman-book/my",
|
||||||
|
method: "GET",
|
||||||
|
},
|
||||||
|
{ pollingInterval: 15_000 },
|
||||||
|
);
|
||||||
const { data: paymentCapabilities } = useGetPaymentCapabilitiesQuery();
|
const { data: paymentCapabilities } = useGetPaymentCapabilitiesQuery();
|
||||||
const [bypassPayment, { isLoading: bypassingPayment }] =
|
const [bypassPayment, { isLoading: bypassingPayment }] =
|
||||||
useBypassPaymentMutation();
|
useBypassPaymentMutation();
|
||||||
|
|||||||
Reference in New Issue
Block a user