diff --git a/packages/twenty-front/src/modules/ui/field/display/components/LinkDisplay.tsx b/packages/twenty-front/src/modules/ui/field/display/components/LinkDisplay.tsx index e966fd1cd..9e2e2b48e 100644 --- a/packages/twenty-front/src/modules/ui/field/display/components/LinkDisplay.tsx +++ b/packages/twenty-front/src/modules/ui/field/display/components/LinkDisplay.tsx @@ -18,6 +18,12 @@ export const LinkDisplay = ({ value }: LinkDisplayProps) => { return <>; } + const absoluteUrl = url + ? url.startsWith('http') + ? url + : 'https://' + url + : ''; + const displayedValue = isNonEmptyString(value?.label) ? value?.label : url?.replace(/^http[s]?:\/\/(?:[w]+\.)?/gm, '').replace(/^[w]+\./gm, ''); @@ -29,8 +35,8 @@ export const LinkDisplay = ({ value }: LinkDisplayProps) => { : LinkType.Url; if (type === LinkType.LinkedIn || type === LinkType.Twitter) { - return ; + return ; } - return ; + return ; };