Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Remove respondToEmail state

Long Hoang5fd868e4b04c
diff --git a/studio/components/interfaces/Support/SupportForm.tsx b/studio/components/interfaces/Support/SupportForm.tsx
index 9c482b87bfb..f927cd86096 100644
--- a/studio/components/interfaces/Support/SupportForm.tsx
+++ b/studio/components/interfaces/Support/SupportForm.tsx
@@ -48,7 +48,6 @@ const SupportForm: FC<Props> = ({ setSentCategory }) => {
const [uploadedFiles, setUploadedFiles] = useState<File[]>([])
const [uploadedDataUrls, setUploadedDataUrls] = useState<string[]>([])
const [selectedServices, setSelectedServices] = useState<string[]>([])
- const [respondToEmail, setRespondToEmail] = useState<string>('')
// Get all orgs and projects from global store
const sortedOrganizations = app.organizations.list()
@@ -77,11 +76,8 @@ const SupportForm: FC<Props> = ({ setSentCategory }) => {
}
}, [uploadedFiles])
- useProfileQuery({
- onSuccess(profile) {
- setRespondToEmail(profile.primary_email)
- },
- })
+ const { data: profile } = useProfileQuery()
+ const respondToEmail = profile?.primary_email ?? 'your email'
if (!isInitialized) {
return (