I have added Custom global header component on my Community using the below code
<div class="slds-global-header__item">
<ul class="slds-global-actions" style="margin-right: 40px;">
<li class="slds-global-actions__item">
<div class="slds-dropdown-trigger slds-dropdown-trigger_click">
<button class="slds-button slds-global-actions__avatar slds-global-actions__item-action"
title="person name" onclick={handleshowloggOffButton} aria-haspopup="true">
<span class="slds-avatar slds-avatar_profile-image-large">
<span class="slds-assistive-text">Person name</span>
</span>
</button>
<section if:true={showLoggOffButton} aria-describedby="dialog-body-id-14"
aria-label="My Favorites" class="slds-popover slds-nubbin_top slds-dynamic-menu"
role="dialog" style="position:absolute;left:-1rem;top:42px; width: 82px;">
<div class="slds-popover__body slds-p-horizontal_none" id="dialog-body-id-14">
<div id="listbox-unique-id" role="listbox">
<ul class="slds-listbox slds-listbox_vertical slds-dropdown_length-10"
role="group" aria-label="My Favorites">
<li role="presentation" class="slds-listbox__item">
<a onclick={handleLogout}
class="slds-text-link_reset slds-text-link slds-align_absolute-center">Log
Out</a>
</li>
</ul>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
handleLogout() {
var newURL =
window.location.protocol +
"//" +
window.location.host +
"/" +
window.location.pathname;
window.location.href = newURL + '/secure/logout.jsp';
}
on click of log off It's showing Invalid Page. Can anyone help me what i am missing here.