Add event addon purchase success page with confetti
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user