Show email that support will reply to after submitting (#19095)

* Show email that support will reply to after submitting

* Fix copy
This commit is contained in:
Joshen Lim
2023-11-21 01:05:09 +08:00
committed by GitHub
parent 82cd7b946b
commit 2187f722c2

View File

@@ -4,12 +4,16 @@ import { Button, IconCheck, IconExternalLink, IconMail, IconSearch, Input } from
import Divider from 'components/ui/Divider'
import { CATEGORY_OPTIONS } from './Support.constants'
import { useProfile } from 'lib/profile'
interface SuccessProps {
sentCategory?: string
}
const Success = ({ sentCategory = '' }: SuccessProps) => {
const { profile } = useProfile()
const respondToEmail = profile?.primary_email ?? 'your email'
const categoriesToShowAdditionalResources = ['Problem', 'Unresponsive', 'Performance']
const selectedCategory = CATEGORY_OPTIONS.find((option) => option.value === sentCategory)
@@ -26,7 +30,7 @@ const Success = ({ sentCategory = '' }: SuccessProps) => {
<div className="flex items-center flex-col space-y-2">
<h3 className="text-xl">Support request successfully sent!</h3>
<p className="text-sm text-foreground-light">
We will reach out to you using your account's email address
We will reach out to you at <span className="text-foreground">{respondToEmail}</span>
</p>
</div>
{categoriesToShowAdditionalResources.includes(sentCategory) && (