-
Notifications
You must be signed in to change notification settings - Fork 21
[Feature] Issue a new card #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
48e806d to
bd45934
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request implements card ordering functionality in a React Native mobile application, enabling users to create both virtual and physical cards through a new OrderCard screen. It also improves the cards list page with enhanced filtering options and fixes various authentication and state management issues.
Key changes:
- Adds a new OrderCard screen with organization selection, card type choice, shipping address input, and card design selection
- Implements field validation and card creation API integration
- Enhances cards filtering to include both canceled and frozen cards toggle
- Improves authentication token refresh handling with request queueing
- Adds error retry logic with exponential backoff for SWR requests
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/cards/OrderCard.tsx | New screen for ordering cards with organization selection, card type, shipping info, and design selection |
| src/utils/cardHelpers.ts | New utility file containing field validation logic for card creation |
| src/utils/cardActions.ts | Adds handleCreateCard function for card creation API call |
| src/pages/cards/cards.tsx | Adds frozen cards filter toggle and navigation button to order cards |
| src/pages/cards/GrantCard.tsx | Fixes activate button visibility to only show for card holder |
| src/lib/client.ts | Refactored token refresh logic with global state and request queueing |
| src/lib/useOfflineSWR.ts | Adds retry logic with exponential backoff for failed requests |
| src/core/AppContent.tsx | Adds custom error retry handler to SWR config |
| src/lib/types/User.ts | Adds shipping_address field and reader role to user types |
| src/lib/types/CardDesign.ts | New type definition for card designs |
| src/lib/NavigatorParamList.ts | Adds OrderCard route to navigation types |
| src/core/Navigator.tsx | Registers OrderCard screen in navigation stack |
| src/components/PaymentCard.tsx | Fixes card logo tint color to show black on non-black cards |
| src/components/ReceiptActionSheet.tsx | Adds anchor positioning for action sheet |
| src/components/receipts/MissingReceiptTransaction.tsx | Passes button ref to action sheet for proper positioning |
| src/components/transaction/ReceiptList.tsx | Passes button ref to action sheet for proper positioning |
| src/pages/Receipts.tsx | Passes button ref to action sheet for proper positioning |
| src/components/cards/RepIcon.tsx | New SVG icon component for virtual cards |
| src/components/cards/CardIcon.tsx | New SVG icon component for physical cards |
| src/auth/AuthProvider.tsx | Removes duplicate error logging during token refresh |
| src/Navigator.tsx | Duplicate/alternative Navigator file with OrderCard registration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Issues attributed to commits in this pull requestThis pull request was merged and Sentry observed the following issues:
|
No description provided.