import { Check } from 'lucide-react' import Link from 'next/link' import { Button, IconDiscord } from 'ui' import { NO_PROJECT_MARKER } from './SupportForm.utils' import { useProjectDetailQuery } from '@/data/projects/project-detail-query' import { useProfile } from '@/lib/profile' interface SuccessProps { sentCategory?: string selectedProject?: string onFinish?: () => void finishLabel?: string showFinishAction?: boolean } export const Success = ({ sentCategory: _sentCategory = '', selectedProject = NO_PROJECT_MARKER, onFinish, finishLabel = 'Finish', showFinishAction = true, }: SuccessProps) => { const { profile } = useProfile() const respondToEmail = profile?.primary_email ?? 'your email' const { data: project } = useProjectDetailQuery( { ref: selectedProject }, { enabled: selectedProject !== NO_PROJECT_MARKER } ) const projectName = project ? project.name : 'No specific project' const finishAction = showFinishAction ? ( onFinish ? ( ) : ( ) ) : null return (

Support request sent

{selectedProject !== NO_PROJECT_MARKER && ( <> Your ticket has been logged for{' '} {projectName}.{' '} )} We'll reach out at{' '} {respondToEmail}.

{finishAction}
) }