*/
import { StandoutLink } from 'design-system';
import * as React from 'react';
+import { parseQuery, serializeQuery } from '../../../apps/issues/utils';
import { getBranchLikeQuery } from '../../../helpers/branch-like';
import { translate } from '../../../helpers/l10n';
import { getComponentIssuesUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import { IssueType } from '../../../types/issues';
import { Issue } from '../../../types/types';
+import { useLocation } from '../../hoc/withRouter';
import { IssueMessageHighlighting } from '../IssueMessageHighlighting';
export interface IssueMessageProps {
export default function IssueMessage(props: IssueMessageProps) {
const { issue, branchLike, displayWhyIsThisAnIssue } = props;
+ const location = useLocation();
+ const query = parseQuery(location.query);
const { message, messageFormattings } = issue;
const issueUrl = getComponentIssuesUrl(issue.project, {
...getBranchLikeQuery(branchLike),
+ ...serializeQuery(query),
open: issue.key,
- types: issue.type === IssueType.SecurityHotspot ? issue.type : undefined,
});
return (
<>