Skip to content

Commit ba8e724

Browse files
committed
fix: events must refresh monthly
1 parent 209eeac commit ba8e724

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

  • apps
    • backend/prisma
    • dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics

apps/backend/prisma/seed.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export async function seed() {
132132
[ITEM_IDS.authUsers]: { quantity: PLAN_LIMITS.free.authUsers, repeat: "never" as const, expires: "when-purchase-expires" as const },
133133
[ITEM_IDS.emailsPerMonth]: { quantity: PLAN_LIMITS.free.emailsPerMonth, repeat: [1, "month"] as any, expires: "when-repeated" as const },
134134
[ITEM_IDS.analyticsTimeoutSeconds]: { quantity: PLAN_LIMITS.free.analyticsTimeoutSeconds, repeat: "never" as const, expires: "when-purchase-expires" as const },
135-
[ITEM_IDS.analyticsEvents]: { quantity: PLAN_LIMITS.free.analyticsEvents, repeat: "never" as const, expires: "when-purchase-expires" as const },
135+
[ITEM_IDS.analyticsEvents]: { quantity: PLAN_LIMITS.free.analyticsEvents, repeat: [1, "month"] as any, expires: "when-repeated" as const },
136136
[ITEM_IDS.sessionReplays]: { quantity: PLAN_LIMITS.free.sessionReplays, repeat: [1, "month"] as any, expires: "when-repeated" as const },
137137
},
138138
},
@@ -154,7 +154,7 @@ export async function seed() {
154154
[ITEM_IDS.authUsers]: { quantity: PLAN_LIMITS.team.authUsers, repeat: "never" as const, expires: "when-purchase-expires" as const },
155155
[ITEM_IDS.emailsPerMonth]: { quantity: PLAN_LIMITS.team.emailsPerMonth, repeat: [1, "month"] as any, expires: "when-repeated" as const },
156156
[ITEM_IDS.analyticsTimeoutSeconds]: { quantity: PLAN_LIMITS.team.analyticsTimeoutSeconds, repeat: "never" as const, expires: "when-purchase-expires" as const },
157-
[ITEM_IDS.analyticsEvents]: { quantity: PLAN_LIMITS.team.analyticsEvents, repeat: "never" as const, expires: "when-purchase-expires" as const },
157+
[ITEM_IDS.analyticsEvents]: { quantity: PLAN_LIMITS.team.analyticsEvents, repeat: [1, "month"] as any, expires: "when-repeated" as const },
158158
[ITEM_IDS.sessionReplays]: { quantity: PLAN_LIMITS.team.sessionReplays, repeat: [1, "month"] as any, expires: "when-repeated" as const },
159159
},
160160
},
@@ -176,7 +176,7 @@ export async function seed() {
176176
[ITEM_IDS.authUsers]: { quantity: PLAN_LIMITS.growth.authUsers, repeat: "never" as const, expires: "when-purchase-expires" as const },
177177
[ITEM_IDS.emailsPerMonth]: { quantity: PLAN_LIMITS.growth.emailsPerMonth, repeat: [1, "month"] as any, expires: "when-repeated" as const },
178178
[ITEM_IDS.analyticsTimeoutSeconds]: { quantity: PLAN_LIMITS.growth.analyticsTimeoutSeconds, repeat: "never" as const, expires: "when-purchase-expires" as const },
179-
[ITEM_IDS.analyticsEvents]: { quantity: PLAN_LIMITS.growth.analyticsEvents, repeat: "never" as const, expires: "when-purchase-expires" as const },
179+
[ITEM_IDS.analyticsEvents]: { quantity: PLAN_LIMITS.growth.analyticsEvents, repeat: [1, "month"] as any, expires: "when-repeated" as const },
180180
[ITEM_IDS.sessionReplays]: { quantity: PLAN_LIMITS.growth.sessionReplays, repeat: [1, "month"] as any, expires: "when-repeated" as const },
181181
},
182182
},

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/shared.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ function SessionReplayLimitBannerInner({ team }: { team: { useItem: (itemId: str
391391
<WarningCircleIcon className="h-4 w-4" />
392392
<AlertDescription>
393393
{isExhausted
394-
? "You've reached your session replay limit for this month. New session replays are no longer being recorded."
395-
: "You're approaching your session replay limit for this month."
394+
? "You've reached your monthly session replay limit. New session replays are no longer being recorded. Your limit resets next month."
395+
: "You're approaching your monthly session replay limit."
396396
}
397397
</AlertDescription>
398398
</Alert>
@@ -432,8 +432,8 @@ function AnalyticsEventLimitBannerInner({ team }: { team: { useItem: (itemId: st
432432
<AlertDescription className="flex items-center justify-between gap-3">
433433
<span>
434434
{isExhausted
435-
? "You've reached your analytics event limit. New events are no longer being tracked."
436-
: "You're approaching your analytics event limit."
435+
? "You've reached your monthly analytics event limit. New events are no longer being tracked. Your limit resets next month."
436+
: "You're approaching your monthly analytics event limit."
437437
}
438438
{canUpgrade && !isExhausted && " Consider upgrading your plan."}
439439
</span>

0 commit comments

Comments
 (0)