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:
parent
47cf92d7b1
commit
16ab946b5d
@ -35,15 +35,17 @@ interface Props {
|
|||||||
className?: string
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function navigateToCatalog() {
|
||||||
|
broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, catalogURL());
|
||||||
|
}
|
||||||
|
|
||||||
export const MainLayoutHeader = observer(({ cluster, className }: Props) => {
|
export const MainLayoutHeader = observer(({ cluster, className }: Props) => {
|
||||||
return (
|
return (
|
||||||
<header className={cssNames("flex gaps align-center justify-space-between", className)}>
|
<header className={cssNames("flex gaps align-center justify-space-between", className)}>
|
||||||
<span className="cluster">{cluster.name}</span>
|
<span className="cluster">{cluster.name}</span>
|
||||||
<div className="closeIde">
|
<div>
|
||||||
<MaterialTooltip title="Back to Catalog" placement="left">
|
<MaterialTooltip title="Back to Catalog" placement="left">
|
||||||
<Icon style={{ cursor: "default" }} material="close" onClick={() =>
|
<Icon style={{ cursor: "default" }} material="close" onClick={navigateToCatalog}/>
|
||||||
broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, catalogURL())
|
|
||||||
} />
|
|
||||||
</MaterialTooltip>
|
</MaterialTooltip>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user