Skip to content

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

Midway clean up, pending E2E hook up

Joshen Lim2a4d9d0efaa1
diff --git a/studio/components/interfaces/Support/Success.tsx b/studio/components/interfaces/Support/Success.tsx
index f23ca765446..20121579dde 100644
--- a/studio/components/interfaces/Support/Success.tsx
+++ b/studio/components/interfaces/Support/Success.tsx
@@ -1,14 +1,7 @@
import Link from 'next/link'
import { FC, useState } from 'react'
-import {
- Button,
- IconCheck,
- IconCheckCircle,
- IconExternalLink,
- IconMail,
- IconSearch,
- Input,
-} from 'ui'
+import { Button, IconCheck, IconExternalLink, IconMail, IconSearch, Input } from 'ui'
+
import Divider from 'components/ui/Divider'
import { CATEGORY_OPTIONS } from './Support.constants'
@@ -38,7 +31,7 @@ const Success: FC<Props> = ({ sentCategory = 'Best_practices' }) => {
<div className="flex items-center flex-col space-y-2">
<h3 className="text-xl">Support request successfully sent!</h3>
<p className="text-sm text-scale-1100">
- We will reach out to you using your GitHub email address
+ We will reach out to you using your account's email address
</p>
</div>
{categoriesToShowAdditionalResources.includes(sentCategory) && (
@@ -60,6 +53,7 @@ const Success: FC<Props> = ({ sentCategory = 'Best_practices' }) => {
icon={<IconSearch size={16} strokeWidth={1.5} />}
actions={[
<Link
+ key="search"
href={`https://github.com/supabase/supabase/discussions?discussions_q=${searchValue}`}
>
<a target="_blank">
@@ -87,23 +81,6 @@ const Success: FC<Props> = ({ sentCategory = 'Best_practices' }) => {
</div>
</div>
)
-
- return (
- <div className="relative my-10 mx-32 space-y-4">
- <div className="absolute -left-14 -top-2.5">
- <IconCheckCircle strokeWidth={2} size={24} background="brand" />
- </div>
- <div>
- <h5 className="block">Support request successfully sent!</h5>
- <p className="text-sm text-scale-1100">
- We will email you back using your GitHub email address
- </p>
- </div>
- <Link href="/">
- <Button>Go back to dashboard</Button>
- </Link>
- </div>
- )
}
export default Success
diff --git a/studio/components/interfaces/Support/Support.constants.ts b/studio/components/interfaces/Support/Support.constants.ts
index 4a96c191dd3..b0f1ca4134d 100644
--- a/studio/components/interfaces/Support/Support.constants.ts
+++ b/studio/components/interfaces/Support/Support.constants.ts
@@ -6,7 +6,7 @@ export const CATEGORY_OPTIONS = [
query: undefined,
},
{
- value: 'Unresponsive',
+ value: 'Database_unresponsive',
label: 'Database unresponsive',
description: 'Issues with connecting to your database',
query: 'Unable to connect',
diff --git a/studio/components/interfaces/Support/SupportForm.tsx b/studio/components/interfaces/Support/SupportForm.tsx
index 45ad8e7ff9b..55448d9ffdf 100644
--- a/studio/components/interfaces/Support/SupportForm.tsx
+++ b/studio/components/interfaces/Support/SupportForm.tsx
@@ -127,22 +127,24 @@ const SupportForm: FC<Props> = ({ setSentCategory }) => {
}
const onSubmit = async (values: any, { setSubmitting }: any) => {
+ setSubmitting(true)
+ const attachments =
+ uploadedFiles.length > 0 ? await uploadAttachments(values.projectRef, uploadedFiles) : []
+ const payload = {
+ ...values,
+ message: formatMessage(values.body, attachments),
+ verified: true,
+ tags: ['dashboard-support-form'],
+ siteUrl: '',
+ additionalRedirectUrls: '',
+ affectedServices: selectedServices.map((service) => service.replace(/ /g, '_').toLowerCase()),
+ }
+
+ console.log('payload', payload)
setSentCategory(values.category)
return
- // setSubmitting(true)
- // const attachments = uploadedFiles
- // ? await uploadAttachments(values.projectRef, uploadedFiles)
- // : []
- // const payload = {
- // ...values,
- // message: formatMessage(values.body, attachments),
- // verified: true,
- // tags: ['dashboard-support-form'],
- // siteUrl: '',
- // additionalRedirectUrls: '',
- // }
-
+ // [Joshen] Need to test this
// if (values.projectRef !== 'no-project') {
// const URL = `${API_URL}/auth/${values.projectRef}/config`
// const authConfig = await get(URL)