Allow partners to view the marketplace#3447
Conversation
But apply restrictions based on profile completion. Once their profile checklist is complete, they're able to apply to marketplace programs.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR removes marketplace access-control gates and replaces them with a profile-checklist system. Authorization checks for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
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: 1
🤖 Fix all issues with AI agents
In
`@apps/web/app/`(ee)/partners.dub.co/(dashboard)/programs/marketplace/[programSlug]/header-controls.tsx:
- Around line 63-100: The disabledTooltip can be undefined while
partner/programEnrollments are still loading, enabling the Apply button briefly;
update the logic that computes disabledTooltip (referencing disabledTooltip,
programEnrollment, checklistProgress, partner, programEnrollments, isComplete)
to explicitly treat the loading state as disabled—e.g., if partner or
programEnrollments is null/undefined return a loading/disabled tooltip (or a
boolean disabled flag) before checking programEnrollment.status or
checklistProgress.isComplete so the button remains disabled until data finishes
loading. Ensure the new guard is included in the same useMemo branch that
computes disabledTooltip and that dependencies [partner, programEnrollments,
programEnrollment, checklistProgress] are updated if needed.
🧹 Nitpick comments (1)
apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/marketplace/[programSlug]/header-controls.tsx (1)
52-61:useProgramEnrollments()is called in both the parent and child components.
MarketplaceProgramHeaderControls(Line 23) andApplyButton(Line 53) both calluseProgramEnrollments(). SWR deduplicates the network request, so there's no performance cost, but you could pass the already-resolved data down as a prop to avoid the redundant hook call.
But apply restrictions based on profile completion. Once their profile checklist is complete, they're able to apply to marketplace programs.
CleanShot.2026-02-09.at.16.47.14.mp4
Summary by CodeRabbit
New Features
Improvements