import { CustomFieldType } from "@/types/resume"; import { getProjectLinkHref } from "@/lib/projectLink"; const trim = (value?: string) => value?.trim() || ""; export const getCustomFieldDisplayText = ( field: Pick ) => { const label = trim(field.label); const value = trim(field.value); if (field.displayLabel) { return label || value; } return value; }; export const shouldShowCustomFieldLabelPrefix = ( field: Pick ) => { return !field.displayLabel && Boolean(trim(field.label)); }; export const getCustomFieldHref = ( field: Pick ) => { if (!field.displayLabel) return null; return getProjectLinkHref(field.value); };