import { Check, ExternalLink, Mail, Search } from 'lucide-react' import Link from 'next/link' import { useState } from 'react' import { useProjectDetailQuery } from 'data/projects/project-detail-query' import { useProfile } from 'lib/profile' import { Button, Input, Separator } from 'ui' import { CATEGORY_OPTIONS } from './Support.constants' import { NO_PROJECT_MARKER } from './SupportForm.utils' interface SuccessProps { sentCategory?: string selectedProject?: string } export const Success = ({ sentCategory = '', selectedProject = NO_PROJECT_MARKER, }: 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 categoriesToShowAdditionalResources = ['Problem', 'Unresponsive', 'Performance'] const selectedCategory = CATEGORY_OPTIONS.find((option) => option.value === sentCategory) const [searchValue, setSearchValue] = useState(selectedCategory?.query ?? '') return (

Support request successfully sent!

We will reach out to you at {respondToEmail}.

{selectedProject !== NO_PROJECT_MARKER && (

Your ticket has been logged for the project{' '} {projectName} with Project ID:{' '} {selectedProject}.

)}
{categoriesToShowAdditionalResources.includes(sentCategory) && ( <>

In the meantime, tap into our community

Find the answers you need with fellow developers building with Supabase by joining our GitHub discussions or on Discord - build the next best thing together

setSearchValue(e.target.value)} icon={} actions={[ , ]} />
)}
) }