// End of third-party imports import { CLIENT_LIBRARIES } from 'common/constants' import { ExternalLink } from 'lucide-react' import Link from 'next/link' import type { UseFormReturn } from 'react-hook-form' import { Button, cn, FormControl, FormField, Select_Shadcn_, SelectContent_Shadcn_, SelectGroup_Shadcn_, SelectItem_Shadcn_, SelectTrigger_Shadcn_, SelectValue_Shadcn_, } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import type { ExtendedSupportCategories } from './Support.constants' import type { SupportFormValues } from './SupportForm.schema' import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled' interface ClientLibraryInfoProps { form: UseFormReturn category: ExtendedSupportCategories library: string | undefined } export function ClientLibraryInfo({ form, category, library }: ClientLibraryInfoProps) { const showClientLibraries = useIsFeatureEnabled('support:show_client_libraries') if (!showClientLibraries) return null if (category !== 'Problem') return null return (
( {CLIENT_LIBRARIES.map((option) => ( {option.language} ))} )} /> {library && library.length > 0 && }
) } interface LibrarySuggestionsProps { library: string } const LibrarySuggestions = ({ library }: LibrarySuggestionsProps) => { const selectedLibrary = CLIENT_LIBRARIES.find((lib) => lib.language === library) const selectedClientLibraries = selectedLibrary?.libraries.filter((library) => library.name.includes('supabase-') ) return (

Found an issue or a bug? Try searching our GitHub issues or submit a new one.

{selectedClientLibraries?.map((lib) => { const libraryLanguage = library === 'Dart (Flutter)' ? lib.name.split('-')[1] : library return (

{lib.name}

For issues regarding the {libraryLanguage} client library

) })}

supabase

For any issues about our API

) }