From 82a0ad93c8ecf1497eb1bf59565cf1194b39d065 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Tue, 21 May 2024 17:42:34 +0800 Subject: [PATCH] Fix ref issue on AlertError component (#26602) --- .../components/interfaces/QueryPerformance/QueryIndexes.tsx | 2 +- apps/studio/components/ui/AlertError.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/studio/components/interfaces/QueryPerformance/QueryIndexes.tsx b/apps/studio/components/interfaces/QueryPerformance/QueryIndexes.tsx index 139ed61b913..6accde06aae 100644 --- a/apps/studio/components/interfaces/QueryPerformance/QueryIndexes.tsx +++ b/apps/studio/components/interfaces/QueryPerformance/QueryIndexes.tsx @@ -168,7 +168,7 @@ export const QueryIndexes = ({ selectedRow }: QueryIndexesProps) => { {isLoadingIndexAdvisorResult && } {isErrorIndexAdvisorResult && ( diff --git a/apps/studio/components/ui/AlertError.tsx b/apps/studio/components/ui/AlertError.tsx index 619943b3969..c340d2c7075 100644 --- a/apps/studio/components/ui/AlertError.tsx +++ b/apps/studio/components/ui/AlertError.tsx @@ -10,7 +10,7 @@ import { import { WarningIcon } from 'ui-patterns/Icons/StatusIcons' export interface AlertErrorProps { - ref?: string + projectRef?: string subject?: string error?: ResponseError | null className?: string @@ -18,11 +18,11 @@ export interface AlertErrorProps { // [Joshen] To standardize the language for all error UIs -const AlertError = ({ ref, subject, error, className }: AlertErrorProps) => { +const AlertError = ({ projectRef, subject, error, className }: AlertErrorProps) => { const subjectString = subject?.replace(/ /g, '%20') let href = `/support/new?category=dashboard_bug` - if (ref) href += `&ref=${ref}` + if (projectRef) href += `&ref=${projectRef}` if (subjectString) href += `&subject=${subjectString}` if (error) href += `&message=Error:%20${error.message}`