From 45f01eaa2a1d08a15d29758b71724ca9a6a44e9a Mon Sep 17 00:00:00 2001 From: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> Date: Fri, 12 May 2023 13:11:51 -0700 Subject: [PATCH] fix: link the relative url Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com> --- ui/src/app/shared/components/deep-links.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ui/src/app/shared/components/deep-links.tsx b/ui/src/app/shared/components/deep-links.tsx index f7881bff537d9..6d9f614ea9661 100644 --- a/ui/src/app/shared/components/deep-links.tsx +++ b/ui/src/app/shared/components/deep-links.tsx @@ -1,4 +1,5 @@ -import * as React from 'react'; +import React from 'react'; +import {Link} from 'react-router-dom'; import {LinkInfo} from '../models'; export const DeepLinks = (props: {links: LinkInfo[]}) => { @@ -7,10 +8,17 @@ export const DeepLinks = (props: {links: LinkInfo[]}) => {
{(links || []).map((link: LinkInfo) => (
- - -
{link.title}
-
+ {link.url.startsWith('http') ? ( + + +
{link.title}
+
+ ) : ( + + +
{link.title}
+ + )} {link.description && <>({link.description})}
))}