parent
40c486702c
commit
960fde80db
@ -20,7 +20,8 @@ const AddIntegrationModal: React.FC<RoutingModalProps> = () => {
|
||||
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');
|
||||
|
@ -53,7 +53,8 @@ const AddNewsletterModal: React.FC<RoutingModalProps> = () => {
|
||||
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');
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -221,7 +221,8 @@ const ThemeToolbar: React.FC<ThemeToolbarProps> = ({
|
||||
} 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 <a href="https://ghost.org/marketplace/">Ghost theme marketplace</a>.</>
|
||||
prompt: uploadConfig?.error || <>Your current plan only supports official themes. You can install them from the <a href="https://ghost.org/marketplace/">Ghost theme marketplace</a>.</>,
|
||||
onOk: () => updateRoute({route: '/pro', isExternal: true})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user