PHP 7.4.33
Preview: headerMapper.ts Size: 738 B
/var/www/uibuilder.cmshelp.dk/httpdocs/src/app/_components/mappers/headerMapper.ts
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const mapUmbracoToHeaderProperties = (umbracoData: any) => {
  const headerTitle = umbracoData.values.find(
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    (item: any) => item.alias === "headerTitle"
  )?.value || "";

  const headerCtaItem = umbracoData.values.find(
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    (item: any) => item.alias === "headerCta"
  );

  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const links = headerCtaItem?.value?.map((link: any) => ({
    text: link.name,
    href: link.url
  })) || [{ text: null, href: null }];

  return {
    title: headerTitle,
    links
  };
};

Directory Contents

Dirs: 0 × Files: 5
Name Size Perms Modified Actions
4.37 KB lrw-r--r-- 2025-03-28 11:03:48
Edit Download
727 B lrw-r--r-- 2025-03-28 11:03:48
Edit Download
738 B lrw-r--r-- 2025-03-28 11:03:48
Edit Download
3.78 KB lrw-r--r-- 2025-03-28 11:03:48
Edit Download
8.06 KB lrw-r--r-- 2025-03-28 11:03:48
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).