-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Updated logic #2582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated logic #2582
Conversation
Updated the program reward and reward list logic to shorten and be more clear for the partners.
|
@marcusljf is attempting to deploy a commit to the Dub Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes refine the logic and phrasing for displaying reward descriptions in partner program UI components. The updates remove the Changes
Poem
β¨ Finishing Touches
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. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (4)
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/rewards/rewards.tsx(0 hunks)apps/web/ui/partners/format-reward-description.ts(1 hunks)apps/web/ui/partners/program-reward-description.tsx(2 hunks)apps/web/ui/partners/program-reward-list.tsx(1 hunks)
π€ Files with no reviewable changes (1)
- apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/rewards/rewards.tsx
π§ Files skipped from review as they are similar to previous changes (2)
- apps/web/ui/partners/program-reward-list.tsx
- apps/web/ui/partners/program-reward-description.tsx
π§° Additional context used
π§ Learnings (2)
π Common learnings
Learnt from: devkiran
PR: dubinc/dub#2448
File: packages/email/src/templates/partner-program-summary.tsx:0-0
Timestamp: 2025-05-29T04:45:18.504Z
Learning: In the PartnerProgramSummary email template (packages/email/src/templates/partner-program-summary.tsx), the stat titles are hardcoded constants ("Clicks", "Leads", "Sales", "Earnings") that will always match the ICONS object keys after toLowerCase() conversion, so icon lookup failures are not possible.
apps/web/ui/partners/format-reward-description.ts (1)
Learnt from: devkiran
PR: dubinc/dub#2448
File: packages/email/src/templates/partner-program-summary.tsx:0-0
Timestamp: 2025-05-29T04:45:18.504Z
Learning: In the PartnerProgramSummary email template (packages/email/src/templates/partner-program-summary.tsx), the stat titles are hardcoded constants ("Clicks", "Leads", "Sales", "Earnings") that will always match the ICONS object keys after toLowerCase() conversion, so icon lookup failures are not possible.
β° Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
π Additional comments (2)
apps/web/ui/partners/format-reward-description.ts (2)
12-13: LGTM! Clean separation of string parts.The separation of "Earn" prefix and reward amount into distinct parts improves the code structure and makes it easier to maintain.
15-19: ```shell
#!/bin/bashLocate the RewardSchema definition file and display its contents
SCHEMA_FILE=$(find apps/web/lib/zod/schemas -type f -iname "rewards*.ts" | head -n1)
echo "Schema file: $SCHEMA_FILE"
sed -n '1,200p' "$SCHEMA_FILE"</details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Updated the program reward and reward list logic to shorten and be more clear for the partners.
Summary by CodeRabbit
New Features
Style