From 9ee90d266beffe5d0fd21de2ce4e39d4fca7d87c Mon Sep 17 00:00:00 2001 From: cheintzman <147882114+cheintzman@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:30:43 -0500 Subject: [PATCH 01/11] Assets 32349 (#24) * Changed decorate(block) to use getBaseConfigPath() to create adp-logo href * Cleaned up new code in adp-header decorate(block) * Changed quickLinks selection resolving missing selection bug in QA --- blocks/adp-header/adp-header.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/blocks/adp-header/adp-header.js b/blocks/adp-header/adp-header.js index b9864550..68444981 100644 --- a/blocks/adp-header/adp-header.js +++ b/blocks/adp-header/adp-header.js @@ -105,13 +105,22 @@ function toggleMenu(nav, navSections, forceExpanded = null) { */ export default async function decorate(block) { block.textContent = ''; + + // change adp-logo href depending on whether user is logged in + let logoHome = null; + if (await window.adobeIMS?.getProfile() != null) { + logoHome = `${getBaseConfigPath()}/` + 'assets'; + } else { + logoHome = `${getBaseConfigPath()}/`; + } + // decorate nav DOM const nav = document.createElement('nav'); nav.id = 'nav'; nav.innerHTML = `