Admin package summary sheet
This commit is contained in:
@@ -25,6 +25,8 @@ export default function WelcomeEventPage() {
|
||||
|
||||
const hasActivePackage =
|
||||
Boolean(overview?.activePackage) || Boolean(overview?.packages?.some((pkg) => pkg.active));
|
||||
const remainingEvents = overview?.activePackage?.remaining_events ?? null;
|
||||
const shouldGoBilling = !hasActivePackage || (remainingEvents !== null && remainingEvents <= 0);
|
||||
const handleSkip = React.useCallback(() => {
|
||||
void trackOnboarding('dismissed');
|
||||
navigate(ADMIN_HOME_PATH);
|
||||
@@ -87,7 +89,10 @@ export default function WelcomeEventPage() {
|
||||
"You're switching to the event manager. Assign tasks, invite members, and test the gallery. You can always return to the welcome journey.",
|
||||
)}
|
||||
</Text>
|
||||
<CTAButton label={t('eventSetup.cta.button', 'Create event')} onPress={() => navigate(adminPath('/mobile/events/new'))} />
|
||||
<CTAButton
|
||||
label={shouldGoBilling ? t('eventSetup.cta.billing', 'Open billing') : t('eventSetup.cta.button', 'Create event')}
|
||||
onPress={() => navigate(shouldGoBilling ? adminPath('/mobile/billing#packages') : adminPath('/mobile/events/new'))}
|
||||
/>
|
||||
</MobileCard>
|
||||
|
||||
<YStack space="$2">
|
||||
|
||||
@@ -30,6 +30,8 @@ export default function WelcomeLandingPage() {
|
||||
|
||||
const hasActivePackage =
|
||||
Boolean(packagesData?.activePackage) || Boolean(packagesData?.packages?.some((pkg) => pkg.active));
|
||||
const remainingEvents = packagesData?.activePackage?.remaining_events ?? null;
|
||||
const shouldGoBilling = !hasActivePackage || (remainingEvents !== null && remainingEvents <= 0);
|
||||
const handleSkip = React.useCallback(() => {
|
||||
void trackOnboarding('dismissed');
|
||||
navigate(ADMIN_HOME_PATH);
|
||||
@@ -60,11 +62,11 @@ export default function WelcomeLandingPage() {
|
||||
<XStack space="$2" flexWrap="wrap">
|
||||
<CTAButton
|
||||
label={
|
||||
hasActivePackage
|
||||
? t('ctaList.createEvent.button', 'Go to event manager')
|
||||
: t('hero.primary.button', 'Explore packages')
|
||||
shouldGoBilling
|
||||
? t('hero.primary.billing', 'Open billing')
|
||||
: t('ctaList.createEvent.button', 'Go to event manager')
|
||||
}
|
||||
onPress={() => navigate(hasActivePackage ? ADMIN_WELCOME_EVENT_PATH : ADMIN_WELCOME_PACKAGES_PATH)}
|
||||
onPress={() => navigate(shouldGoBilling ? adminPath('/mobile/billing#packages') : ADMIN_WELCOME_EVENT_PATH)}
|
||||
fullWidth={false}
|
||||
/>
|
||||
{hasEvents ? (
|
||||
|
||||
Reference in New Issue
Block a user