) => void;
};
@@ -22,14 +23,20 @@ const StyledClickable = styled.div`
`;
const StyledChip = styled(Chip)`
+ border-color: ${({ theme }) => theme.border.color.strong};
box-sizing: border-box;
padding: ${({ theme }) => theme.spacing(2)};
`;
-export const RoundedLink = ({ children, href, onClick }: RoundedLinkProps) => (
+export const RoundedLink = ({
+ children,
+ className,
+ href,
+ onClick,
+}: RoundedLinkProps) => (
{children !== '' ? (
-
+
)}
-
+ {isString(text) ? : text}
);
diff --git a/packages/twenty-front/src/utils/url/getAbsoluteUrl.ts b/packages/twenty-front/src/utils/url/getAbsoluteUrl.ts
new file mode 100644
index 000000000..39be8641c
--- /dev/null
+++ b/packages/twenty-front/src/utils/url/getAbsoluteUrl.ts
@@ -0,0 +1,9 @@
+import { absoluteUrlSchema } from '~/utils/validation-schemas/absoluteUrlSchema';
+
+export const getAbsoluteUrl = (url: string) => {
+ try {
+ return absoluteUrlSchema.parse(url);
+ } catch {
+ return '';
+ }
+};
diff --git a/packages/twenty-front/src/utils/url/getUrlHostName.ts b/packages/twenty-front/src/utils/url/getUrlHostName.ts
index 41e8b8096..39de988ff 100644
--- a/packages/twenty-front/src/utils/url/getUrlHostName.ts
+++ b/packages/twenty-front/src/utils/url/getUrlHostName.ts
@@ -1,8 +1,8 @@
-import { absoluteUrlSchema } from '~/utils/validation-schemas/absoluteUrlSchema';
+import { getAbsoluteUrl } from '~/utils/url/getAbsoluteUrl';
export const getUrlHostName = (url: string) => {
try {
- const absoluteUrl = absoluteUrlSchema.parse(url);
+ const absoluteUrl = getAbsoluteUrl(url);
return new URL(absoluteUrl).hostname.replace(/^www\./i, '');
} catch {
return '';