From fb220121858f2e34f384b66a8b37904e95027609 Mon Sep 17 00:00:00 2001
From: Jordi Enric
Date: Thu, 5 Jun 2025 18:40:15 +0200
Subject: [PATCH] Replace support link with ContactSupportButton component in
AlertError
---
apps/studio/components/ui/AlertError.tsx | 29 +++++++++---------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/apps/studio/components/ui/AlertError.tsx b/apps/studio/components/ui/AlertError.tsx
index 5081f7385fe..f0fdccb3049 100644
--- a/apps/studio/components/ui/AlertError.tsx
+++ b/apps/studio/components/ui/AlertError.tsx
@@ -1,13 +1,7 @@
-import Link from 'next/link'
import { PropsWithChildren } from 'react'
-import {
- AlertDescription_Shadcn_,
- AlertTitle_Shadcn_,
- Alert_Shadcn_,
- Button,
- WarningIcon,
-} from 'ui'
+import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, WarningIcon } from 'ui'
+import { ContactSupportButton } from './ContactSupportButton'
export interface AlertErrorProps {
projectRef?: string
@@ -27,13 +21,6 @@ const AlertError = ({
showIcon = true,
children,
}: PropsWithChildren) => {
- const subjectString = subject?.replace(/ /g, '%20')
- let href = `/support/new?category=dashboard_bug`
-
- if (projectRef) href += `&ref=${projectRef}`
- if (subjectString) href += `&subject=${subjectString}`
- if (error) href += `&error=${error.message}`
-
const formattedErrorMessage = error?.message?.includes('503')
? '503 Service Temporarily Unavailable'
: error?.message
@@ -51,9 +38,15 @@ const AlertError = ({
{children}
-
+
)