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 = `