Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Mason Fish <mason@looky.cloud>
  • Loading branch information
Mason Fish committed Oct 15, 2020
1 parent 5d10725 commit 6945a0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/js/brim/brimTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import {SpacesState} from "../state/Spaces/types"
import {TabState} from "../state/Tab/types"
import lib from "../lib"

// pass in connection status
export default function(tab: TabState, spaces: SpacesState) {
return {
title() {
// if status is disconnected then provide an error title
const name = get(
spaces,
[tab.current.connectionId || "", tab.current.spaceId || "", "name"],
Expand Down
19 changes: 8 additions & 11 deletions src/js/components/ClusterPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,19 @@ export default function ClusterPicker() {
}
})

if (clusters.length > 0) template.push({type: "separator"})

template.push({
label: "+ New Connection",
click: () => dispatch(Modal.show("new-connection"))
})
template.push(
{type: "separator"},
{
label: "+ New Connection",
click: () => dispatch(Modal.show("new-connection"))
}
)

const menu = usePopupMenu(template)

const currentLabel = current
? `${current.host}:${current.port}`
: "No Connection"

return (
<ClusterPickerWrapper onClick={menu.onClick}>
<label>{currentLabel}</label>
<label>{`${current.host}:${current.port}`}</label>
<DropdownArrow />
</ClusterPickerWrapper>
)
Expand Down

0 comments on commit 6945a0d

Please sign in to comment.