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 isCombined = service === "COMBINED";
|
||||
|
||||
const { data, isLoading, refetch } = useApiQuery<SeamanBookOverview>({
|
||||
url: "/seaman-book/my",
|
||||
method: "GET",
|
||||
});
|
||||
// Polled, not fetch-once: the officer who claims/reviews/approves this
|
||||
// application (and the auto-promotion when the parent seafarer
|
||||
// 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 [bypassPayment, { isLoading: bypassingPayment }] =
|
||||
useBypassPaymentMutation();
|
||||
|
||||
Reference in New Issue
Block a user