Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe changes add an optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 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: 0
🧹 Nitpick comments (2)
src/pages/campaigns.tsx (2)
52-73: Header controls: behavior OK; consider minor a11y and reuse improvementsBehaviorally the arrows + VIEW ALL button layout and navigation look fine, and the
/campaignslink is appropriate, but two small follow‑ups to consider:
- The arrow
<img>elements withonClickare not keyboard accessible; wrapping them in<button>with properaria-labels would improve accessibility and match semantics.- This arrow-control pattern is duplicated in
src/pages/index.tsx(lines 170‑181); extracting a small shared component would reduce duplication.Please confirm there are no design constraints preventing turning these into
<button>elements and, if desired, I can outline a small sharedCarouselArrowscomponent.
78-81: Updated featured on_chain_id filter; watch coupling to hard-coded countThe filter now targets
[106, 101, 91], which aligns with the current hard-coded…{current + 1}/3display, but this will silently drift if featured IDs are ever added/removed.Consider deriving the denominator from
data.filter(/* ids */).lengthinstead of hard-coding3, and please verify that all three IDs are expected to be present in the campaign feed in your target environments.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/pages/campaigns.tsx(2 hunks)src/pages/index.tsx(2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-04-17T14:16:13.402Z
Learnt from: carina-akaia
Repo: PotLock/potlock-nextjs-app PR: 365
File: src/features/donation/models/effects/index.ts:155-174
Timestamp: 2025-04-17T14:16:13.402Z
Learning: The transaction outcome handling in src/features/donation/models/effects/index.ts is temporary and will be replaced with `nearRps.txStatus` in the future, so extensive refinements to the current implementation aren't necessary.
Applied to files:
src/pages/index.tsx
📚 Learning: 2025-07-02T13:31:11.268Z
Learnt from: akaia-shadowfox
Repo: PotLock/potlock-nextjs-app PR: 424
File: src/pages/index.tsx:52-56
Timestamp: 2025-07-02T13:31:11.268Z
Learning: In src/pages/index.tsx, the donation count (total_donations_count) is intentionally displayed with a dollar sign prefix for UI consistency, even though it represents a count rather than a currency amount. This is the intended behavior.
Applied to files:
src/pages/index.tsx
📚 Learning: 2025-06-02T18:44:53.590Z
Learnt from: akaia-shadowfox
Repo: PotLock/potlock-nextjs-app PR: 400
File: src/features/donation/components/modal-confirmation-screen.tsx:83-88
Timestamp: 2025-06-02T18:44:53.590Z
Learning: In src/features/donation/components/modal-confirmation-screen.tsx, the isFeeBypassAllowed flag is temporarily hardcoded to true for urgent shipping, with a TODO comment indicating it should be replaced with campaign permission-based logic using campaign?.allow_fee_avoidance ?? false for campaign donations.
Applied to files:
src/pages/campaigns.tsx
🧬 Code graph analysis (2)
src/pages/index.tsx (1)
src/pages/campaigns.tsx (1)
FeaturedCampaigns(19-86)
src/pages/campaigns.tsx (2)
src/common/api/indexer/internal/client.generated.ts (1)
Campaign(1565-1678)src/common/ui/layout/components/atoms/button.tsx (1)
Button(111-111)
⏰ 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: build (20.x)
🔇 Additional comments (3)
src/pages/campaigns.tsx (1)
19-25: showViewAll prop shape and default look goodThe added optional showViewAll prop with a default of false keeps existing callers working and matches how it’s used from Home.
Please ensure any other imports/usages of
FeaturedCampaigns(if present outside this file) are updated if they rely on a stricter prop type definition.src/pages/index.tsx (2)
26-37: FEATURED_PROJECT_ACCOUNT_IDS updates are straightforwardThe mainnet featured project list change is a simple data update; the mapping logic below remains valid with the new accounts.
Please double-check these account IDs against the intended featured set for mainnet, especially
fastnear.tg, to ensure there are no typos.
160-164: Home’s FeaturedCampaigns usage matches new API and handles loading stateUsing
campaigns?.results ?? []aligns with theCampaign[]data prop, andshowViewAll={true}correctly enables the new button on the homepage while keeping the campaigns page unchanged (default false).Please verify in the UI that the VIEW ALL button appears only on Home and that the section hides gracefully when there are no campaigns (empty array).
Summary by CodeRabbit
New Features
Updates
✏️ Tip: You can customize this high-level summary in your review settings.