fix(frontend): replay row-flash on every refetch via dataUpdatedAt key
The previous static key={c.id} let React reuse the same <TableRow>
element across refetches, so animate-row-flash only played on
initial mount and on the first render of a brand-new claim_id.
Updated rows whose claim_id was unchanged never re-flashed.
Re-keying on `${c.id}-${dataUpdatedAt}` re-mounts the row on
every refetch (initial load, filter change, parse invalidation),
so the 1.2s accent-tint flash replays each time.
Also: README's 'Frontend unit tests (when added)' is stale — npm
test now exists and runs 3 passing tests.
hooks: add dataUpdatedAt: 0 to the !isConfigured fallback return
so the pages type-check.
This commit is contained in:
@@ -54,6 +54,7 @@ export function useClaims(params: ListClaimsParams) {
|
||||
isError: false,
|
||||
error: null,
|
||||
refetch: () => Promise.resolve(),
|
||||
dataUpdatedAt: 0,
|
||||
} as const;
|
||||
}
|
||||
return q;
|
||||
|
||||
@@ -37,6 +37,7 @@ export function useRemittances(params: ListRemittancesParams) {
|
||||
isError: false,
|
||||
error: null,
|
||||
refetch: () => Promise.resolve(),
|
||||
dataUpdatedAt: 0,
|
||||
} as const;
|
||||
}
|
||||
return q;
|
||||
|
||||
Reference in New Issue
Block a user