feat(frontend): add toast notification system and transaction history list (Closes #48, #52) - #116
Open
ToryMic wants to merge 1 commit into
Open
Conversation
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
Resolves two
good first issuefrontend tickets:ToastProvider+useToast()hook so any component can triggersuccess/error/infotoasts. Toasts render in a fixed bottom-right stack, auto-dismiss after 4 seconds, and use the project CSS design tokens (dark/light compatible).<TransactionList />that renders type icon, truncated ID, amount, formatted date, and a status badge (pending/confirmed/failed), with a friendly empty state.Changes
frontend/src/components/Toast.tsx—ToastProvider, presentationalToast, toast store context (useToastContext),AUTO_DISMISS_MS = 4000frontend/src/components/Toast.module.css— fixed bottom-right viewport, per-type color/icon styling, entry animation, responsivefrontend/src/hooks/useToast.ts—useToast()→{ toast, success, error, info, dismiss, clear }frontend/src/components/TransactionList.tsx— typedTransaction/TransactionType/TransactionStatus,TransactionList,EmptyStatefrontend/src/components/TransactionList.module.css— row/empty-state styling with design tokensfrontend/src/components/index.ts— exports the new components/typesfrontend/src/main.tsx— wraps<App />in<ToastProvider>frontend/src/App.tsx— triggers toasts on connect/deposit/transfer/withdraw (replaces inline success banner) and demos the transaction listVerification
cd frontend && npm install && npm run build— passes (tsc && vite build)Notes
useTheme.ts+Headertoggle wired inApp.tsx), so I picked [Frontend] Add toast notification system for success and error feedback #48 and [Frontend] Add transaction history list component #52 instead.