Files
twenty_crm/packages/twenty-front/src/utils/url/getAbsoluteUrl.ts
Thaïs b0d1cc9dcb feat: add links to Links field (#5223)
Closes #5115, Closes #5116

<img width="242" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/ab78495a-4216-4243-8de3-53720818a09b">

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-05-07 15:05:18 +02:00

10 lines
215 B
TypeScript

import { absoluteUrlSchema } from '~/utils/validation-schemas/absoluteUrlSchema';
export const getAbsoluteUrl = (url: string) => {
try {
return absoluteUrlSchema.parse(url);
} catch {
return '';
}
};