Skip to content

fix: Home carousel not clickable#1302

Merged
Zishan-7 merged 1 commit intopeanut-wallet-devfrom
fix/carousel-not-clickable
Oct 9, 2025
Merged

fix: Home carousel not clickable#1302
Zishan-7 merged 1 commit intopeanut-wallet-devfrom
fix/carousel-not-clickable

Conversation

@Zishan-7
Copy link
Contributor

@Zishan-7 Zishan-7 commented Oct 9, 2025

No description provided.

@vercel
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Ready Ready Preview Comment Oct 9, 2025 7:22am

@notion-workspace
Copy link

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary of changes
HomeBanners components
src/components/Home/HomeBanners/BannerCard.tsx, src/components/Home/HomeBanners/index.tsx
BannerCardProps extended with optional onClick; BannerCard forwards onClick to Card; HomeBanners passes banner.onClick to BannerCard for non-notification banners.
Banner hooks
src/hooks/useBanners.tsx
Imports Next.js router; adds onClick handler on KYC banner to call router.push('/profile/identity-verification').

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • kushagrasarathe
  • Hugo0

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request lacks any description of the changes or objectives, providing no context for the modifications made in the changeset. Please add a brief description summarizing the purpose of the pull request and outlining the key changes to aid reviewers in understanding the modifications.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly states the main change of enabling click functionality on the home carousel and concisely reflects the fix introduced in the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/carousel-not-clickable

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added the enhancement New feature or request label Oct 9, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 324fd93 and 816b645.

📒 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

@Zishan-7 Zishan-7 merged commit 8e486c3 into peanut-wallet-dev Oct 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants