Allow dashboard access with active package
This commit is contained in:
@@ -57,7 +57,7 @@ describe('resolveOnboardingRedirect', () => {
|
||||
expect(result).toBe(ADMIN_BILLING_PATH);
|
||||
});
|
||||
|
||||
it('redirects to billing when no remaining events', () => {
|
||||
it('returns null when no remaining events but an active package exists', () => {
|
||||
const result = resolveOnboardingRedirect({
|
||||
hasEvents: false,
|
||||
hasActivePackage: true,
|
||||
@@ -67,7 +67,7 @@ describe('resolveOnboardingRedirect', () => {
|
||||
isOnboardingDismissed: false,
|
||||
isOnboardingCompleted: false,
|
||||
});
|
||||
expect(result).toBe(ADMIN_BILLING_PATH);
|
||||
expect(result).toBeNull();
|
||||
});
|
||||
|
||||
it('returns null when remaining events are available', () => {
|
||||
|
||||
@@ -34,7 +34,7 @@ export function resolveOnboardingRedirect({
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!hasEvents && (!hasActivePackage || (remainingEvents !== undefined && remainingEvents !== null && remainingEvents <= 0))) {
|
||||
if (!hasEvents && !hasActivePackage) {
|
||||
return ADMIN_BILLING_PATH;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user