1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Moving onClick handler away

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-05-23 14:57:58 +03:00
parent 47cf92d7b1
commit 16ab946b5d

View File

@ -35,15 +35,17 @@ interface Props {
className?: string
}
function navigateToCatalog() {
broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, catalogURL());
}
export const MainLayoutHeader = observer(({ cluster, className }: Props) => {
return (
<header className={cssNames("flex gaps align-center justify-space-between", className)}>
<span className="cluster">{cluster.name}</span>
<div className="closeIde">
<div>
<MaterialTooltip title="Back to Catalog" placement="left">
<Icon style={{ cursor: "default" }} material="close" onClick={() =>
broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, catalogURL())
} />
<Icon style={{ cursor: "default" }} material="close" onClick={navigateToCatalog}/>
</MaterialTooltip>
</div>
</header>