import { Boxes, Lock } from 'lucide-react' import Link from 'next/link' import { useIsMFAEnabled } from 'common' import { ActionCard } from 'components/ui/ActionCard' import { useProjectsQuery } from 'data/projects/projects-query' import { Organization } from 'types' import { cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' export const OrganizationCard = ({ organization, href, }: { organization: Organization href?: string }) => { const isUserMFAEnabled = useIsMFAEnabled() const { data } = useProjectsQuery() const allProjects = data?.projects ?? [] const numProjects = allProjects.filter((x) => x.organization_slug === organization.slug).length const isMfaRequired = organization.organization_requires_mfa return ( div]:w-full [&>div]:items-center')} icon={} title={organization.name} description={ {organization.plan.name} Plan {numProjects > 0 && ( <> • {numProjects} project{numProjects > 1 ? 's' : ''} > )} {isMfaRequired && ( MFA enforced )} } /> ) }