fix: show header only if not empty

This commit is contained in:
Maas Lalani 2023-03-22 11:17:06 -04:00
parent 38521ff870
commit bb103c0a03
No known key found for this signature in database
GPG Key ID: 5A6ED5CBF1A0A000
1 changed files with 4 additions and 1 deletions

View File

@ -134,7 +134,10 @@ func (m model) View() string {
}
view := m.textinput.View() + "\n" + m.viewport.View()
return lipgloss.JoinVertical(lipgloss.Left, header, view)
if m.header != "" {
return lipgloss.JoinVertical(lipgloss.Left, header, view)
}
return view
}
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {