Skip to content

Commit 72c2829

Browse files
committed
fix: events must refresh monthly
1 parent 6fc1056 commit 72c2829

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
@@ -393,8 +393,8 @@ function SessionReplayLimitBannerInner({ team }: { team: { useItem: (itemId: str
393393
<WarningCircleIcon className="h-4 w-4" />
394394
<AlertDescription>
395395
{isExhausted
396-
? "You've reached your session replay limit for this month. New session replays are no longer being recorded."
397-
: "You're approaching your session replay limit for this month."
396+
? "You've reached your monthly session replay limit. New session replays are no longer being recorded. Your limit resets next month."
397+
: "You're approaching your monthly session replay limit."
398398
}
399399
</AlertDescription>
400400
</Alert>
@@ -434,8 +434,8 @@ function AnalyticsEventLimitBannerInner({ team }: { team: { useItem: (itemId: st
434434
<AlertDescription className="flex items-center justify-between gap-3">
435435
<span>
436436
{isExhausted
437-
? "You've reached your analytics event limit. New events are no longer being tracked."
438-
: "You're approaching your analytics event limit."
437+
? "You've reached your monthly analytics event limit. New events are no longer being tracked. Your limit resets next month."
438+
: "You're approaching your monthly analytics event limit."
439439
}
440440
{canUpgrade && !isExhausted && " Consider upgrading your plan."}
441441
</span>

0 commit comments

Comments
 (0)