mirror of
https://github.com/status-im/whispervis.git
synced 2025-02-12 21:16:27 +00:00
Cleanup
This commit is contained in:
parent
a99d940fab
commit
4c8e2b71f4
2
page.go
2
page.go
@ -271,12 +271,12 @@ func (p *Page) renderTabs() *vecty.HTML {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// onTabSwitch returns a proper tab switching function depending on the tab clicked.
|
||||||
func (p *Page) onTabSwitch(view string) func(e *vecty.Event) {
|
func (p *Page) onTabSwitch(view string) func(e *vecty.Event) {
|
||||||
if p.activeView == view {
|
if p.activeView == view {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return func(e *vecty.Event) {
|
return func(e *vecty.Event) {
|
||||||
fmt.Println("Set view", view)
|
|
||||||
p.activeView = view
|
p.activeView = view
|
||||||
vecty.Rerender(p)
|
vecty.Rerender(p)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user