Add event addon purchase success page with confetti
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-07 17:04:14 +01:00
parent 64b3bf3ed4
commit c0c082975e
15 changed files with 837 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ import {
} from '../api';
import { getApiErrorMessage } from '../lib/apiError';
import { buildLimitWarnings } from '../lib/limitWarnings';
import { adminPath, ADMIN_EVENT_VIEW_PATH } from '../constants';
import { adminPath, ADMIN_EVENT_ADDON_SUCCESS_PATH, ADMIN_EVENT_VIEW_PATH } from '../constants';
import { useBackNavigation } from './hooks/useBackNavigation';
import { useAdminTheme } from './theme';
import { MobileShell } from './components/MobileShell';
@@ -312,11 +312,13 @@ export default function MobileEventAddonsPage() {
const pagePath = adminPath(`/mobile/events/${slug}/addons`);
const currentUrl = `${window.location.origin}${pagePath}`;
const successPath = `${ADMIN_EVENT_ADDON_SUCCESS_PATH(slug)}?addon_key=${encodeURIComponent(pendingAddonKey)}`;
const successUrl = `${window.location.origin}${successPath}`;
try {
const checkout = await createEventAddonCheckout(slug, {
addon_key: pendingAddonKey,
success_url: `${currentUrl}?addon_success=1`,
success_url: successUrl,
cancel_url: currentUrl,
accepted_terms: consents.acceptedTerms,
accepted_waiver: consents.acceptedWaiver,