feat: Top investors leaderboard, edit invoice page, admin review page, and optimistic notification updates - #74
Merged
Conversation
…nvoice review, and optimistic notifications update - Issue StellarState#53: Add TopInvestorsLeaderboard section to home page with 5-minute refetchInterval - Issue StellarState#52: Add EditInvoiceForm and pages at seller edit routes for draft invoices - Issue StellarState#41: Add AdminInvoiceReview page with approve and reject actions & non-admin guard - Issue StellarState#42: Add optimistic updates to useMarkNotificationRead with rollback and nav bell counter update
|
@makuo567 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! 🚀 |
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.
Summary
This PR addresses and resolves issues #53, #52, #41, and #42 in
StellarState/SS-frontend.Features & Fixes Included
1. Top Investors Leaderboard Section (#53)
TopInvestorsLeaderboardcomponent anduseLeaderboardhook fetching from/api/leaderboard.refetchInterval: 300,000ms).truncateAddress), total committed XLM (formatXLM), and invoice count in descending order of total committed XLM (top 5).app/page.tsx.2. Edit Draft Invoice Page for Sellers (#52)
EditInvoiceFormcomponent and routes at/seller/edit/[id]and/seller/invoices/[id]/edit.DocumentUploadto upload to IPFS.PATCHrequest on save with updated fields and redirects back to the seller dashboard (/seller).3. Admin Invoice Review Page (#41)
AdminInvoiceReviewcomponent and routes at/admin/review,/admin/invoices, and/admin.pending_reviewinvoices displaying title, seller wallet (truncated), face value, and submission date.4. Optimistic Update for Notification Read Action (#42)
useMarkNotificationReadusing React Query'sonMutate,onError, andonSettled.Navbar.tsx.Verification & Testing
TopInvestorsLeaderboard.test.tsx,EditInvoiceForm.test.tsx,AdminInvoiceReview.test.tsx,useNotifications.test.tsx).npm run type-check) passed with zero errors.npm run build) succeeded cleanly.closes #53
closes #52
closes #41
closes #42