aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/web-api
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/web-api')
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/Action.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Menu-test.tsx.snap36
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap4
6 files changed, 26 insertions, 25 deletions
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx
index 1b7cfafa7ff..621a0a624b2 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx
@@ -19,7 +19,7 @@
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import LinkIcon from '../../../components/icons/LinkIcon';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { queryToSearch } from '../../../helpers/urls';
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx
index 8cf0c9623ff..997f5b3c05b 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx
@@ -19,7 +19,7 @@
*/
import classNames from 'classnames';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
import { queryToSearch } from '../../../helpers/urls';
import { WebApi } from '../../../types/types';
import { actionsFilter, isDomainPathActive, Query, serializeQuery } from '../utils';
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
index b872548ae65..ce56fd9101d 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
@@ -20,9 +20,10 @@
import { maxBy } from 'lodash';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
-import { Link, Params, useParams } from 'react-router-dom';
+import { Params, useParams } from 'react-router-dom';
import { fetchWebApi } from '../../../api/web-api';
import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
+import Link from '../../../components/common/Link';
import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
import Suggestions from '../../../components/embed-docs-modal/Suggestions';
import { Location, Router, withRouter } from '../../../components/hoc/withRouter';
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap
index af905ee7f55..c01b5c6181d 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap
@@ -97,7 +97,7 @@ exports[`should render correctly 1`] = `
<header
className="web-api-action-header boxed-group-header"
>
- <Link
+ <ForwardRef(Link)
className="spacer-right link-no-underline"
to={
Object {
@@ -107,7 +107,7 @@ exports[`should render correctly 1`] = `
}
>
<LinkIcon />
- </Link>
+ </ForwardRef(Link)>
<h3
className="web-api-action-title"
>
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Menu-test.tsx.snap b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Menu-test.tsx.snap
index 629742ef918..784c7812d74 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Menu-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Menu-test.tsx.snap
@@ -7,7 +7,7 @@ exports[`should also render domains with an actions description matching the que
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="bar"
to={
@@ -22,8 +22,8 @@ exports[`should also render domains with an actions description matching the que
>
bar
</h3>
- </Link>
- <Link
+ </ForwardRef(Link)>
+ <ForwardRef(Link)
className="list-group-item"
key="baz"
to={
@@ -38,7 +38,7 @@ exports[`should also render domains with an actions description matching the que
>
baz
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
@@ -50,7 +50,7 @@ exports[`should not render deprecated domains 1`] = `
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
@@ -65,7 +65,7 @@ exports[`should not render deprecated domains 1`] = `
>
foo
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
@@ -77,7 +77,7 @@ exports[`should not render internal domains 1`] = `
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
@@ -92,7 +92,7 @@ exports[`should not render internal domains 1`] = `
>
foo
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
@@ -104,7 +104,7 @@ exports[`should render deprecated domains 1`] = `
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
@@ -119,8 +119,8 @@ exports[`should render deprecated domains 1`] = `
>
foo
</h3>
- </Link>
- <Link
+ </ForwardRef(Link)>
+ <ForwardRef(Link)
className="list-group-item"
key="bar"
to={
@@ -138,7 +138,7 @@ exports[`should render deprecated domains 1`] = `
since="5.0"
/>
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
@@ -150,7 +150,7 @@ exports[`should render internal domains 1`] = `
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
@@ -165,8 +165,8 @@ exports[`should render internal domains 1`] = `
>
foo
</h3>
- </Link>
- <Link
+ </ForwardRef(Link)>
+ <ForwardRef(Link)
className="list-group-item"
key="bar"
to={
@@ -182,7 +182,7 @@ exports[`should render internal domains 1`] = `
bar
<InternalBadge />
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
@@ -194,7 +194,7 @@ exports[`should render only domains with an action matching the query 1`] = `
<div
className="list-group"
>
- <Link
+ <ForwardRef(Link)
className="list-group-item"
key="foo"
to={
@@ -209,7 +209,7 @@ exports[`should render only domains with an action matching the query 1`] = `
>
foo
</h3>
- </Link>
+ </ForwardRef(Link)>
</div>
</div>
`;
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap
index 1fc0062503f..7fea4a5eca3 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap
@@ -70,13 +70,13 @@ exports[`should render correctly 2`] = `
<div
className="web-api-page-header"
>
- <Link
+ <ForwardRef(Link)
to="/web_api/"
>
<h1>
api_documentation.page
</h1>
- </Link>
+ </ForwardRef(Link)>
</div>
<Search
onSearch={[Function]}