import { AnimatePresence, motion } from 'framer-motion' import Link from 'next/link' import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query' import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization' import { AlertDescription_Shadcn_ as AlertDescription, AlertTitle_Shadcn_ as AlertTitle, buttonVariants, cn, } from 'ui' import { Admonition } from 'ui-patterns/admonition' import { useSelectedProject } from 'hooks/misc/useSelectedProject' export function SpendCapDisabledSection() { const org = useSelectedOrganization() const project = useSelectedProject() const { data, // no error/isError states handled here, as a parent component handles them // we rely on this to check if the subscription has loaded isSuccess, } = useOrgSubscriptionQuery({ orgSlug: org?.slug, }) const isSpendCapEnabled = isSuccess && data?.plan.id !== 'free' && !data?.usage_billing_enabled && project?.cloud_provider !== 'FLY' return ( {isSpendCapEnabled && ( Disable spend cap to manage Disk configuration To access disk management features, you need to disable your spend cap. These features offer more flexibility and control over your database disk size.
Disable spend cap
)}
) }