From 262dd1317bfd02e61ef9853ac9084de360191a65 Mon Sep 17 00:00:00 2001 From: Elinor Date: Fri, 18 Mar 2022 12:14:39 +0300 Subject: [PATCH] Fix: Update Tip message format (#1570) --- src/app/views/app-sections/StatusMessages.tsx | 9 ++++----- src/types/status.ts | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/views/app-sections/StatusMessages.tsx b/src/app/views/app-sections/StatusMessages.tsx index 6e831b0d0..086c6c37c 100644 --- a/src/app/views/app-sections/StatusMessages.tsx +++ b/src/app/views/app-sections/StatusMessages.tsx @@ -53,20 +53,19 @@ const StatusMessages = () => { if (queryRunnerStatus) { const { messageType, statusText, status, duration, hint } = queryRunnerStatus; let urls: any = {}; - let message = statusText; - const extractedUrls = extractUrl(statusText); + let message = status.toString(); + const extractedUrls = extractUrl(status.toString()); if (extractedUrls) { - message = replaceLinks(statusText); + message = replaceLinks(status.toString()); urls = convertArrayToObject(extractedUrls); } - return dispatch(clearQueryStatus())} dismissButtonAriaLabel='Close' aria-live={'assertive'}> - {`${status} - `}{displayStatusMessage(message, urls)} + {`${statusText} - `}{displayStatusMessage(message, urls)} {duration && <> {` - ${duration}`} diff --git a/src/types/status.ts b/src/types/status.ts index 88e96295e..6413cd82e 100644 --- a/src/types/status.ts +++ b/src/types/status.ts @@ -3,7 +3,7 @@ import { MessageBarType } from '@fluentui/react'; export interface IStatus { messageType: MessageBarType; ok: boolean; - status: number; + status: number | string; statusText: string; duration?: number; hint?: string;