[TASK-15768] feat: Clickable PFPs in txn receipt#1325
[TASK-15768] feat: Clickable PFPs in txn receipt#1325Zishan-7 merged 1 commit intopeanut-wallet-devfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds an isAvatarClickable prop to TransactionDetailsHeaderCard to conditionally enable avatar-based navigation to /{userName} via Next.js router. TransactionDetailsReceipt computes and passes this prop, replacing prior profile button logic and removing the explicit “Go to profile” button. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/components/TransactionDetails/TransactionDetailsHeaderCard.tsx(4 hunks)src/components/TransactionDetails/TransactionDetailsReceipt.tsx(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Deploy-Preview
🔇 Additional comments (2)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (2)
325-332: Well-structured clickability logic.The
isAvatarClickablecondition properly handles all the necessary checks:
- Excludes link transactions where the recipient might not have a profile
- Excludes wallet addresses (non-user identifiers)
- Restricts to relevant transaction types (send/request/receive)
This ensures the avatar is only clickable when navigation to a user profile makes sense.
371-371: Prop correctly passed to header component.The
isAvatarClickableprop is properly passed toTransactionDetailsHeaderCard, enabling the avatar clickability feature. This maintains clean separation of concerns between the receipt (determines when clickability should be enabled) and the header (implements the clickable behavior).
No description provided.