more usage of tamagui primitives

This commit is contained in:
Codex Agent
2025-12-30 16:04:30 +01:00
parent efe2f25b3e
commit d7c2f85eeb
12 changed files with 744 additions and 315 deletions

View File

@@ -49,6 +49,20 @@ describe('resolveOnboardingRedirect', () => {
expect(result).toBeNull();
});
it('returns null for event creation path', () => {
const result = resolveOnboardingRedirect({
hasEvents: false,
hasActivePackage: true,
selectedPackageId: null,
pathname: '/event-admin/mobile/events/new',
isWelcomePath: false,
isBillingPath: false,
isOnboardingDismissed: false,
isOnboardingCompleted: false,
});
expect(result).toBeNull();
});
it('redirects to event setup when package active', () => {
const result = resolveOnboardingRedirect({
hasEvents: false,

View File

@@ -1,4 +1,5 @@
import {
ADMIN_EVENT_CREATE_PATH,
ADMIN_WELCOME_BASE_PATH,
ADMIN_WELCOME_EVENT_PATH,
ADMIN_WELCOME_SUMMARY_PATH,
@@ -37,6 +38,10 @@ export function resolveOnboardingRedirect({
return null;
}
if (pathname.startsWith(ADMIN_EVENT_CREATE_PATH)) {
return null;
}
const shouldContinueSummary = Boolean(selectedPackageId && selectedPackageId > 0);
const target = hasActivePackage
? ADMIN_WELCOME_EVENT_PATH