Skip to content

Commit

Permalink
Fix: Update Tip message format (#1570)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinorW authored Mar 18, 2022
1 parent ecef40f commit 262dd13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/app/views/app-sections/StatusMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MessageBar messageBarType={messageType}
isMultiline={true}
onDismiss={() => dispatch(clearQueryStatus())}
dismissButtonAriaLabel='Close'
aria-live={'assertive'}>
{`${status} - `}{displayStatusMessage(message, urls)}
{`${statusText} - `}{displayStatusMessage(message, urls)}

{duration && <>
{` - ${duration}`}<FormattedMessage id='milliseconds' />
Expand Down
2 changes: 1 addition & 1 deletion src/types/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 262dd13

Please sign in to comment.