mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-25 17:34:52 +10:00
21 lines
429 B
TypeScript
21 lines
429 B
TypeScript
type WebsiteDisplay = {
|
|
url: string;
|
|
label?: string | undefined;
|
|
};
|
|
|
|
type CustomFieldLink = {
|
|
link?: string | undefined;
|
|
};
|
|
|
|
export const getWebsiteDisplayText = (website: WebsiteDisplay): string => {
|
|
const label = website.label?.trim();
|
|
|
|
return label || website.url;
|
|
};
|
|
|
|
export const getCustomFieldLinkUrl = (field: CustomFieldLink): string | undefined => {
|
|
const link = field.link?.trim();
|
|
|
|
return link || undefined;
|
|
};
|