Unify InlineForm success callbacks to onSuccess(type) #41

Closed
opened 2026-05-02 13:35:19 +02:00 by myrmidex · 0 comments
Owner

InlineFormProps has three parallel optional callbacks (onPurchaseSuccess, onMilestoneSuccess, onPriceSuccess). As more form types are added this grows to n callbacks.

Fix: Replace with onSuccess: (type: 'purchase' | 'milestone' | 'price') => void. Parent dispatches based on type. Eliminates anonymous wrapper lambdas in InlineForm.tsx lines 43–62.

Effort: S — do when InlineForm is touched for another reason.

`InlineFormProps` has three parallel optional callbacks (`onPurchaseSuccess`, `onMilestoneSuccess`, `onPriceSuccess`). As more form types are added this grows to n callbacks. **Fix:** Replace with `onSuccess: (type: 'purchase' | 'milestone' | 'price') => void`. Parent dispatches based on type. Eliminates anonymous wrapper lambdas in `InlineForm.tsx` lines 43–62. **Effort:** S — do when `InlineForm` is touched for another reason.
myrmidex added this to the v0.3.0 milestone 2026-05-02 13:35:19 +02:00
myrmidex self-assigned this 2026-05-02 20:31:55 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/incr#41
No description provided.