Problem
After a successful pledge in `funding-modal.tsx`, the page does `window.location.reload()` to reflect the new funding state. This breaks the SPA experience, loses scroll position, and causes a jarring full-page refresh.
Current Code
// After successful pledge
window.location.reload();
Expected Behavior
- Use React state management to refresh funding data after pledge
- Invalidate relevant queries (e.g., campaign data, funding progress, backers list)
- Show updated funding progress bar immediately
- Maintain scroll position and UI state
- Consider optimistic update: show new amount immediately, reconcile with server
Implementation
- If using React Query / SWR: invalidate campaign and contributions queries
- If using local state: re-fetch via `getCampaignOnChain()` and update sidebar
- Add `onSuccess` callback prop to `FundingModal` to notify parent
Acceptance Criteria
Priority
Low — Functional but poor UX.
Labels
crowdfunding, ui, ux
Problem
After a successful pledge in `funding-modal.tsx`, the page does `window.location.reload()` to reflect the new funding state. This breaks the SPA experience, loses scroll position, and causes a jarring full-page refresh.
Current Code
Expected Behavior
Implementation
Acceptance Criteria
Priority
Low — Functional but poor UX.
Labels
crowdfunding,ui,ux