mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Context We've been seeing many `NotFoundError: Failed to execute 'removeChild' on 'Node'` and `NotFoundError: Failed to execute 'insertBefore' on 'Node'` events on Sentry which are historically known to be caused by Google Translate in the browser. There's technically no _right way_ to address this unfortunately, but one of the solutions which should address most of these issues is to wrap any dynamic text within a span - we've considered that quite a while back tbh but never took the time to do this until today with the help of Claude. Although just a heads up that it might not necessarily completely eradicate those issues. Also added an eslint rule which should prevent future occurences of this <img width="1264" height="192" alt="image" src="https://github.com/user-attachments/assets/b2c32ea0-45a2-4ccd-82fe-1a859905fc29" />
53 lines
2.0 KiB
TypeScript
53 lines
2.0 KiB
TypeScript
import { toast } from 'sonner'
|
|
|
|
import { NO_PROJECT_MARKER } from './SupportForm.utils'
|
|
import CopyButton from '@/components/ui/CopyButton'
|
|
|
|
interface SupportFormDirectEmailContentProps {
|
|
projectRef: string | null
|
|
}
|
|
|
|
export function SupportFormDirectEmailContent({ projectRef }: SupportFormDirectEmailContentProps) {
|
|
const hasProjectRef = projectRef && projectRef !== NO_PROJECT_MARKER
|
|
|
|
return (
|
|
<div className="text-sm text-foreground-light">
|
|
<p className="flex items-center gap-x-1.5 flex-wrap">
|
|
Please email us directly at
|
|
<span className="inline-flex items-center gap-x-1">
|
|
<a
|
|
href={`mailto:support@supabase.com?subject=${encodeURIComponent('Support Request')}${hasProjectRef ? `${encodeURIComponent(' for Project ID: ')}${encodeURIComponent(projectRef)}` : ''}&body=${encodeURIComponent('Here is a detailed description of the problem I am experiencing and any other information that might be helpful...')}`}
|
|
className="hover:text-foreground transition-colors duration-100"
|
|
>
|
|
<code className="!text-foreground-light underline decoration-foreground-lighter/50 hover:decoration-foreground-lighter/80 transition-colors duration-100">
|
|
support@supabase.com
|
|
</code>
|
|
</a>
|
|
<CopyButton
|
|
variant="text"
|
|
text="support@supabase.com"
|
|
iconOnly
|
|
onClick={() => toast.success('Copied email address to clipboard')}
|
|
/>
|
|
</span>{' '}
|
|
and include as much information as possible
|
|
{hasProjectRef && (
|
|
<>
|
|
, along with project ID
|
|
<span className="inline-flex items-center gap-x-1">
|
|
<code className="!text-foreground-light">{projectRef}</code>
|
|
<CopyButton
|
|
iconOnly
|
|
variant="text"
|
|
text={projectRef}
|
|
onClick={() => toast.success('Copied project ID to clipboard')}
|
|
/>
|
|
</span>
|
|
</>
|
|
)}
|
|
<span>.</span>
|
|
</p>
|
|
</div>
|
|
)
|
|
}
|