feat(utils): add function to format first word of recipient name in t…#500
feat(utils): add function to format first word of recipient name in t…#500sundayonah wants to merge 1 commit into
Conversation
…itle case - Introduced `formatRecipientNameFirstWordForPill` to extract and title-case the first word of a recipient's name. - Updated `TransactionStatus` component to utilize the new formatting function for improved display of recipient names.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new utility function ChangesRecipient Name Formatting Extraction
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
Description
The success screen showed the recipient’s first name in all lowercase in the small end-of-flow pills (e.g.
john) while the headline used proper title case. That came from(recipientName ?? "").toLowerCase().split(" ")[0]with no re-capitalization.This PR removes that behavior by centralizing formatting in
formatRecipientNameFirstWordForPill, which mirrors the same per-word title casing used in the success copy, then takes the first word only. Pills stay truncated but now align with the headline.References
None.
Testing
Manual
Checklist
mainBy submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.
Summary by CodeRabbit