Skip to content

feat(ui): add empty and error states to RatePreview#620

Open
Neziahtech wants to merge 1 commit into
ezedike-evan:mainfrom
Neziahtech:main
Open

feat(ui): add empty and error states to RatePreview#620
Neziahtech wants to merge 1 commit into
ezedike-evan:mainfrom
Neziahtech:main

Conversation

@Neziahtech

Copy link
Copy Markdown

Closes #527

Summary

Summary
Adds graceful empty and error states to the landing RatePreview component so the card is never blank or broken when the rate snapshot is unavailable.

Changes

components/landing/RatePreview.tsx — introduces two new render branches:

Empty state — shown when the snapshot returns no data; displays a neutral, informative message so users know rates are temporarily unavailable rather than seeing a blank card.
Error state — shown on fetch failure; displays a distinct error message and a Retry button that re-triggers the snapshot fetch without a full page reload.

Behaviour

Scenario Before After

Snapshot unavailable (empty) Blank/broken card Friendly "no data" message
Snapshot fetch error Blank/broken card Error message + Retry affordance
Snapshot loads successfully Normal card Unchanged

Acceptance criteria met

Empty state renders with messaging distinct from the error state
Error state renders with messaging distinct from the empty state
Retry button present on error state; absent on empty state
Card is never blank or visually broken in either case

…ng page

B094: Graceful empty + error states for the landing rate preview when the snapshot is unavailable.
- Added RatePreview component fetching /api/snapshot for best anchor rates per corridor
- Error state: red-themed message with Retry button
- Empty states (distinct messaging): no corridor data vs no anchors returning rates
- All states render a proper card structure, never blank/broken
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the ezedikeevan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Neziahtech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ezedike-evan ezedike-evan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI workflows haven't triggered for this PR yet. Please push an empty commit or close and reopen to re-trigger GitHub Actions. Once check (node 20) and check (node 22) go green, we can proceed with review.

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.

B094: [FEAT] [UI] Empty/error states for rate preview

2 participants