diff --git a/pkg/interface/src/views/apps/links/components/LinkItem.tsx b/pkg/interface/src/views/apps/links/components/LinkItem.tsx index 8934416b6..027b25926 100644 --- a/pkg/interface/src/views/apps/links/components/LinkItem.tsx +++ b/pkg/interface/src/views/apps/links/components/LinkItem.tsx @@ -67,6 +67,7 @@ export const LinkItem = (props: LinkItemProps): ReactElement => { const size = node.children ? node.children.size : 0; const contents = node.post.contents; const hostname = URLparser.exec(contents[1].url) ? URLparser.exec(contents[1].url)[4] : null; + const href = URLparser.exec(contents[1].url) ? contents[1].url : `http://${contents[1].url}` const baseUrl = props.baseUrl || `/~404/${resource}`; @@ -120,7 +121,7 @@ export const LinkItem = (props: LinkItemProps): ReactElement => { { remoteRef.current = r }} renderUrl={false} - url={contents[1].url} + url={href} text={contents[0].text} unfold={true} onLoad={onMeasure} @@ -145,7 +146,7 @@ export const LinkItem = (props: LinkItemProps): ReactElement => { }} /> - + {hostname}