mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
Sidemenu: Fix logout button (#38747)
This commit is contained in:
parent
3fb5afb9e3
commit
b40d48258d
@ -26,15 +26,16 @@ const DropDownChild = ({ isDivider = false, icon, onClick, target, text, url }:
|
||||
|
||||
let anchor = <a onClick={onClick}>{linkContent}</a>;
|
||||
if (url) {
|
||||
anchor = url.startsWith('/') ? (
|
||||
<Link onClick={onClick} href={url}>
|
||||
{linkContent}
|
||||
</Link>
|
||||
) : (
|
||||
<a href={url} target={target} rel="noopener" onClick={onClick}>
|
||||
{linkContent}
|
||||
</a>
|
||||
);
|
||||
anchor =
|
||||
!target && url.startsWith('/') ? (
|
||||
<Link onClick={onClick} href={url}>
|
||||
{linkContent}
|
||||
</Link>
|
||||
) : (
|
||||
<a href={url} target={target} rel="noopener" onClick={onClick}>
|
||||
{linkContent}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
return isDivider ? <li data-testid="dropdown-child-divider" className="divider" /> : <li>{anchor}</li>;
|
||||
|
Loading…
Reference in New Issue
Block a user