aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/docs/DocLink.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components/docs/DocLink.tsx')
-rw-r--r--server/sonar-web/src/main/js/components/docs/DocLink.tsx18
1 files changed, 6 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/components/docs/DocLink.tsx b/server/sonar-web/src/main/js/components/docs/DocLink.tsx
index fd19f91cd94..17b99af9c4e 100644
--- a/server/sonar-web/src/main/js/components/docs/DocLink.tsx
+++ b/server/sonar-web/src/main/js/components/docs/DocLink.tsx
@@ -23,18 +23,12 @@ import { Link } from 'react-router';
export default function DocLink(props: React.AnchorHTMLAttributes<HTMLAnchorElement>) {
const { children, href, ...other } = props;
- if (process.env.NODE_ENV === 'development') {
- if (href && href.startsWith('#')) {
- return (
- <>
- {/* TODO implement after SONAR-10612 Create documentation space in the web app */}
- <Link to="" {...other}>
- {children}
- </Link>
- <strong className="little-spacer-left text-danger">[TODO]</strong>
- </>
- );
- }
+ if (href && href.startsWith('/')) {
+ return (
+ <Link to={`/documentation/${href.substr(1)}`} {...other}>
+ {children}
+ </Link>
+ );
}
return (