[TASK-16465] Feat: Add merchant map CTA#1410
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded@Zishan-7 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 29 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThis PR updates the "/foodie" redirect destination in redirects.json and adds support for secondary icons in carousel CTAs. A new PIX payment promotion CTA is introduced featuring a logo and Brazilian flag icon. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
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
🧹 Nitpick comments (2)
src/components/Home/HomeCarouselCTA/CarouselCTA.tsx (2)
106-107: Optimize image dimensions to match rendered size.The image is rendered at 16×16px (
size-4) but requests 64×64px, resulting in unnecessary bandwidth usage. Specify dimensions closer to the rendered size.Apply this diff:
alt="secondary icon" - height={64} - width={64} + height={16} + width={16} quality={100}
105-105: Improve alt text for better accessibility.The generic alt text "secondary icon" doesn't describe what the icon represents. Consider making it more descriptive (e.g., "Brazil flag" for country-specific promotions) or deriving it from context.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
redirects.json(1 hunks)src/components/Home/HomeCarouselCTA/CarouselCTA.tsx(3 hunks)src/components/Home/HomeCarouselCTA/index.tsx(1 hunks)src/hooks/useHomeCarouselCTAs.tsx(3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: jjramirezn
Repo: peanutprotocol/peanut-ui PR: 1190
File: src/app/(mobile-ui)/qr-pay/page.tsx:156-176
Timestamp: 2025-09-08T03:13:09.111Z
Learning: In the peanut-ui mobile app, the `/qr-pay` route is only accessed through the DirectSendQR component which always includes the qrCode parameter in the URL when redirecting users to the QR pay page after scanning MERCADO_PAGO or PIX QR codes.
📚 Learning: 2025-07-24T13:26:10.290Z
Learnt from: Hugo0
Repo: peanutprotocol/peanut-ui PR: 1014
File: src/components/Claim/Link/Initial.view.tsx:413-413
Timestamp: 2025-07-24T13:26:10.290Z
Learning: In the peanut-ui repository, the change from `${SQUID_API_URL}/route` to `${SQUID_API_URL}/v2/route` in src/components/Claim/Link/Initial.view.tsx was a typo fix, not an API migration, as the codebase was already using Squid API v2.
Applied to files:
redirects.json
🧬 Code graph analysis (1)
src/components/Home/HomeCarouselCTA/CarouselCTA.tsx (1)
src/components/Global/Icons/Icon.tsx (1)
Icon(209-218)
🔇 Additional comments (6)
redirects.json (1)
50-50: LGTM!The redirect URL update to include the full Notion page title improves readability and maintainability.
src/components/Home/HomeCarouselCTA/index.tsx (1)
34-34: LGTM!The
secondaryIconprop is correctly propagated from the CTA data to theCarouselCTAcomponent.src/hooks/useHomeCarouselCTAs.tsx (2)
37-48: Verify the intentional ordering of the PIX promo CTA.The new merchant-map-pix CTA is added before the notification and KYC prompts, meaning it will always appear first in the carousel. Please confirm this is the intended priority.
47-47: Consider using a local asset instead of an external CDN URL.Using an external CDN URL for the flag icon introduces several concerns:
- Network dependency: The image will fail to load if the CDN is unavailable, the user is offline, or the service blocks the domain
- Performance: Requires additional DNS lookup and HTTP request
- No error handling or fallback if the image fails to load
Consider importing a local flag asset similar to how PIX is imported.
⛔ Skipped due to learnings
Learnt from: Zishan-7 Repo: peanutprotocol/peanut-ui PR: 1098 File: src/components/LandingPage/noFees.tsx:243-248 Timestamp: 2025-08-15T08:05:05.417Z Learning: In the peanut-ui project, when displaying country flags from external CDNs like flagcdn.com, the preference is to show country-specific images without fallback handling. The team prioritizes showing accurate country flags over having generic fallback images.src/components/Home/HomeCarouselCTA/CarouselCTA.tsx (2)
98-100: LGTM with note on size changes.The icon and logo size increases (22px and 36px respectively) provide better visual hierarchy.
109-109: Review z-index hierarchy for potential conflicts.The
z-50value is significantly higher than the close button'sz-10. While this ensures the secondary icon appears above the primary icon, verify it doesn't inadvertently overlap or conflict with other UI elements like the close button.
No description provided.