feat(ui): add empty and error states to RatePreview#620
Open
Neziahtech wants to merge 1 commit into
Open
Conversation
…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
|
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. |
|
@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! 🚀 |
ezedike-evan
left a comment
Owner
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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