import { AlertDialogDescription, AlertDialogLabel } from '@reach/alert-dialog' import { useCallback } from 'react' import { WebApplication } from '@/Application/Application' import { openSubscriptionDashboard } from '@/Utils/ManageSubscription' import Icon from '@/Components/Icon/Icon' import { PremiumFeatureIconClass, PremiumFeatureIconName } from '@/Components/Icon/PremiumFeatureIcon' export const UpgradePrompt = ({ featureName, ctaRef, application, hasSubscription, onClose, }: { featureName?: string ctaRef: React.RefObject application: WebApplication hasSubscription: boolean onClose: () => void }) => { const handleClick = useCallback(() => { if (hasSubscription) { void openSubscriptionDashboard(application) } else { void application.openPurchaseFlow() } onClose() }, [application, hasSubscription, onClose]) return ( <>
Enable Advanced Features
{featureName && ( To take advantage of {featureName} and other advanced features, upgrade your current plan. )} {!featureName && ( To take advantage of all the advanced features Standard Notes has to offer, upgrade your current plan. )} {application.isNativeIOS() && (
The Professional Plan costs $119.99/year and includes benefits like
  • 100GB encrypted file storage
  • Access to all note types, including Super, markdown, rich text, authenticator, tasks, and spreadsheets
  • Access to Daily Notebooks and Moments journals
  • Note history going back indefinitely
  • Nested folders for your tags
  • Premium support
)}
) }