Skip to content
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

YPP rewards adjustments #4647

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/atlas/atlas.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ features:
multiplier: 2.5
- minimumSubscribers: 50000
multiplier: 5
tiersTooltip: The more subscribers you have on YouTube, the higher the payouts in the program. For 5-50K subscribers, payouts are multiplied by 2.5, for more than 50K subscribers, payouts are 5x as high. Below displayed rewards are calculated for your channel.
tiersTooltip: The more subscribers you have on YouTube, the higher the payouts in the program.
rewards:
- title: Sign Up to YouTube Partner Program
showInDashboard: false # Optional. If false the reward will be shown only on YouTube partner program landing page. Default true
Expand All @@ -72,9 +72,10 @@ features:
- Make sure the auto-sync feature enabled.
- Wait till your videos get synced to your $VITE_APP_NAME channel.
- Publish new videos to your YouTube channel.
- Get rewarded for every new video synced to $VITE_APP_NAME.
- Get rewarded for every new video synced to $VITE_APP_NAME. Min length of rewarded video is 5 minutes. Sync rewards capped to 3 per week.
baseAmount: null
baseUsdAmount: 3
baseUsdAmount: 1
customMultiplier: [1, 5, 10]
- title: Refer another YouTube creator
shortDescription: Get JOY for every new creator who signs up to YPP program using your referral link. Referrals multiplier depends on the popularity tier of the channel signed up using referral link.
stepsDescription: Earn when another YouTube creator signs up to the program by using your your referral link.
Expand Down
1 change: 1 addition & 0 deletions packages/atlas/src/config/configSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const configSchema = z.object({
}),
])
.nullable(),
customMultiplier: z.array(z.number()).optional(),
actionButtonText: z.string().optional(),
actionButtonAction: z
.string()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const REWARDS =
steps: reward.steps,
joyAmount: reward.baseAmount,
usdAmount: reward.baseUsdAmount,
customMultiplier: reward.customMultiplier,
...(reward.actionButtonText
? {
actionButton: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,21 @@ export const YppDashboardMainTab: FC<YppDashboardMainTabProps> = ({ currentTier
)}
<RewardsWrapper>
{REWARDS?.map((reward) => {
const customMultiplier = reward.customMultiplier
const rewardAmount = reward.joyAmount
? typeof reward.joyAmount === 'number'
? { type: 'number' as const, amount: reward.joyAmount * multiplier }
? {
type: 'number' as const,
amount: reward.joyAmount * (customMultiplier ? customMultiplier[currentTier] : multiplier),
}
: { type: 'range' as const, min: reward.joyAmount.min, max: reward.joyAmount.max }
: null
const rewardAmountUsd = reward.usdAmount
? typeof reward.usdAmount === 'number'
? { type: 'number' as const, amount: reward.usdAmount * multiplier }
? {
type: 'number' as const,
amount: reward.usdAmount * (customMultiplier ? customMultiplier[currentTier] : multiplier),
}
: { type: 'range' as const, min: reward.usdAmount.min, max: reward.usdAmount.max }
: null
return (
Expand Down
Loading