diff --git a/apps/admin-x-settings/src/components/settings/advanced/integrations/AddIntegrationModal.tsx b/apps/admin-x-settings/src/components/settings/advanced/integrations/AddIntegrationModal.tsx index a23610576c..3a812290b3 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/integrations/AddIntegrationModal.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/integrations/AddIntegrationModal.tsx @@ -20,7 +20,8 @@ const AddIntegrationModal: React.FC = () => { limiter.errorIfWouldGoOverLimit('customIntegrations').catch((error) => { if (error instanceof HostLimitError) { NiceModal.show(LimitModal, { - prompt: error.message || `Your current plan doesn't support more custom integrations.` + prompt: error.message || `Your current plan doesn't support more custom integrations.`, + onOk: () => updateRoute({route: '/pro', isExternal: true}) }); modal.remove(); updateRoute('integrations'); diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx index 327f346251..2f5e549e70 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx @@ -53,7 +53,8 @@ const AddNewsletterModal: React.FC = () => { limiter?.errorIfWouldGoOverLimit('newsletters').catch((error) => { if (error instanceof HostLimitError) { NiceModal.show(LimitModal, { - prompt: error.message || `Your current plan doesn't support more newsletters.` + prompt: error.message || `Your current plan doesn't support more newsletters.`, + onOk: () => updateRoute({route: '/pro', isExternal: true}) }); modal.remove(); updateRoute('newsletters'); diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx index 503b643fd5..467d267026 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx @@ -102,6 +102,7 @@ const Sidebar: React.FC<{ errors: ErrorMessages; clearError: (field: string) => void; }> = ({newsletter, onlyOne, updateNewsletter, validate, errors, clearError}) => { + const {updateRoute} = useRouting(); const {mutateAsync: editNewsletter} = useEditNewsletter(); const limiter = useLimiter(); const {settings, siteData, config} = useGlobalData(); @@ -159,7 +160,8 @@ const Sidebar: React.FC<{ } catch (error) { if (error instanceof HostLimitError) { NiceModal.show(LimitModal, { - prompt: error.message || `Your current plan doesn't support more newsletters.` + prompt: error.message || `Your current plan doesn't support more newsletters.`, + onOk: () => updateRoute({route: '/pro', isExternal: true}) }); return; } else { diff --git a/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx b/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx index 65f0d26e69..c6dc240247 100644 --- a/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx @@ -157,7 +157,8 @@ const UserDetailModalContent: React.FC<{user: User}> = ({user}) => { if (error instanceof HostLimitError) { NiceModal.show(LimitModal, { formSheet: true, - prompt: error.message || `Your current plan doesn't support more users.` + prompt: error.message || `Your current plan doesn't support more users.`, + onOk: () => updateRoute({route: '/pro', isExternal: true}) }); return; } else { diff --git a/apps/admin-x-settings/src/components/settings/site/ThemeModal.tsx b/apps/admin-x-settings/src/components/settings/site/ThemeModal.tsx index f6b4b77e95..926359f2cc 100644 --- a/apps/admin-x-settings/src/components/settings/site/ThemeModal.tsx +++ b/apps/admin-x-settings/src/components/settings/site/ThemeModal.tsx @@ -221,7 +221,8 @@ const ThemeToolbar: React.FC = ({ } else { NiceModal.show(LimitModal, { title: 'Upgrade to enable custom themes', - prompt: uploadConfig?.error || <>Your current plan only supports official themes. You can install them from the Ghost theme marketplace. + prompt: uploadConfig?.error || <>Your current plan only supports official themes. You can install them from the Ghost theme marketplace., + onOk: () => updateRoute({route: '/pro', isExternal: true}) }); } };