btc wizard

This commit is contained in:
Nati
2026-08-19 10:10:22 +00:00
parent 548846a1bd
commit 2b07cacce1

View File

@@ -236,10 +236,21 @@ export function SeamanBookPage({
const isBtc = service === "BTC";
const isCombined = service === "COMBINED";
const { data, isLoading, refetch } = useApiQuery<SeamanBookOverview>({
// 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();