import { AnimatePresence, motion } from 'framer-motion' import Link from 'next/link' import router from 'next/router' import { useEffect, useState } from 'react' import SVG from 'react-inlinesvg' import { Button } from 'ui' import { NO_ORG_MARKER } from './SupportForm.utils' import { useOrganizationsQuery } from '@/data/organizations/organizations-query' interface DiscordCTACardProps { organizationSlug?: string | null } export const DiscordCTACard = ({ organizationSlug }: DiscordCTACardProps) => { const { data: organizations } = useOrganizationsQuery() const [isVisible, setIsVisible] = useState(false) const selectedOrg = organizations?.find((org) => org.slug === organizationSlug) const isFreePlan = selectedOrg?.plan.id === 'free' useEffect(() => { const timer = setTimeout(() => setIsVisible(true), 800) return () => clearTimeout(timer) }, []) return ( {isVisible && isFreePlan && organizationSlug !== NO_ORG_MARKER && (
{/* Decorative background */}
{/* Content */}
Ask the Discord community

Many code-related questions are answered within minutes.

)} ) }