fix: Home carousel not clickable#1302
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds an optional onClick prop to BannerCard, wires onClick from HomeBanners to BannerCard, and defines a router-based onClick for the KYC banner in useBanners to navigate to /profile/identity-verification. 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 (3)
src/components/Home/HomeBanners/BannerCard.tsx(1 hunks)src/components/Home/HomeBanners/index.tsx(1 hunks)src/hooks/useBanners.tsx(3 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 (3)
src/components/Home/HomeBanners/index.tsx (1)
41-41: LGTM! onClick properly forwarded to BannerCard.The onClick handler is correctly forwarded from the banner to the BannerCard component for non-notification banners, enabling click navigation while preserving the existing notification banner flow.
src/hooks/useBanners.tsx (1)
7-7: LGTM! Router setup is correct.The useRouter import from 'next/navigation' and initialization are correct for Next.js App Router.
Also applies to: 25-25
src/components/Home/HomeBanners/BannerCard.tsx (1)
12-12: LGTM! onClick prop correctly added.The optional onClick prop is properly typed and destructured, maintaining backward compatibility for banners without click handlers.
Also applies to: 15-15
No description provided.