Quick-pay was duplicated verbatim in TrackerRow and MobileTrackerRow (create payment + Undo toast + refresh, with a manual busy flag on mobile). Extracted into a shared useQuickPay() React Query mutation hook: isPending comes for free (replaces the quickPaySaving state), the tracker/badge caches invalidate on settle, and the flow lives in one place. Behavior identical. (togglePaid keeps its local optimistic flip as-is; other mutations can adopt the same useMutation pattern incrementally.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| useAuth.jsx | ||
| useAutoSave.js | ||
| useAutoSave.test.jsx | ||
| usePaymentActions.js | ||
| useQueries.js | ||
| useSearchPanelPreference.js | ||