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>
10 lines
215 B
TypeScript
10 lines
215 B
TypeScript
import { absoluteUrlSchema } from '~/utils/validation-schemas/absoluteUrlSchema';
|
|
|
|
export const getAbsoluteUrl = (url: string) => {
|
|
try {
|
|
return absoluteUrlSchema.parse(url);
|
|
} catch {
|
|
return '';
|
|
}
|
|
};
|