Avoid billing redirect for endcustomer packages
This commit is contained in:
@@ -169,6 +169,7 @@ export default function MobileDashboardPage() {
|
||||
const activePackage =
|
||||
packagesOverview?.activePackage ?? packagesOverview?.packages?.find((pkg) => pkg.active) ?? null;
|
||||
const remainingEvents = activePackage?.remaining_events ?? null;
|
||||
const isResellerPackage = activePackage?.package_type === 'reseller';
|
||||
const summarySeenPackageId =
|
||||
summarySeenOverride ?? onboardingStatus?.steps?.summary_seen_package_id ?? null;
|
||||
const hasSummaryPackage =
|
||||
@@ -178,7 +179,7 @@ export default function MobileDashboardPage() {
|
||||
!packagesLoading &&
|
||||
!packagesError &&
|
||||
!effectiveHasEvents &&
|
||||
(activePackage === null || (remainingEvents !== null && remainingEvents <= 0));
|
||||
(activePackage === null || (isResellerPackage && remainingEvents !== null && remainingEvents <= 0));
|
||||
|
||||
React.useEffect(() => {
|
||||
if (packagesLoading || !shouldRedirectToBilling) {
|
||||
|
||||
Reference in New Issue
Block a user