Skip to content

fix: update hero images immediately after upload#393

Merged
williamluke4 merged 1 commit intopreviewfrom
williamluke4/fix-image-cache
Apr 9, 2026
Merged

fix: update hero images immediately after upload#393
williamluke4 merged 1 commit intopreviewfrom
williamluke4/fix-image-cache

Conversation

@williamluke4
Copy link
Copy Markdown
Member

Summary

  • Replace invalidate()/refetch() with setData() to directly update the TanStack Query cache after image uploads on voucher and pool hero sections
  • Fixes the issue where uploaded banner/icon images wouldn't appear until page refresh

Test plan

  • Upload a voucher banner image and verify it appears immediately
  • Upload a voucher icon image and verify it appears immediately
  • Upload a pool banner image and verify it appears immediately
  • Verify error toasts still appear on upload failure

🤖 Generated with Claude Code

Use setData to directly update TanStack Query cache with new image URLs
instead of invalidate/refetch, so the UI reflects changes without reload.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sarafu-network Ready Ready Preview, Comment Apr 9, 2026 1:31pm

Request Review

@williamluke4 williamluke4 merged commit 9fdf8f0 into preview Apr 9, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant