Skip to content

Commit

Permalink
fix style (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Sep 2, 2023
1 parent db542a7 commit 2a8213a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ui/style/style.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ func AsciiArt() lipgloss.Style {
}

const (
errorMessage = "unexpected error happens.\n\nplease report at\n\nhttps://github.com/JunNishimura/Chatify/issues"
errorDisplayWidth = 60
errorDisplayHeight = 10
DefaultErrorMessage = "unexpected error happens.\n\nplease report at\n\nhttps://github.com/JunNishimura/Chatify/issues"
errorDisplayWidth = 60
errorDisplayHeight = 10
)

func ErrorView(windowWidth, windowHeight int) string {
func ErrorView(message string, windowWidth, windowHeight int) string {
return lipgloss.Place(windowWidth, windowHeight, lipgloss.Center, lipgloss.Center,
lipgloss.NewStyle().
Width(errorDisplayWidth).
Expand All @@ -117,5 +117,5 @@ func ErrorView(windowWidth, windowHeight int) string {
Align(lipgloss.Center).
Foreground(lipgloss.Color(Red)).
Background(lipgloss.Color(BgColor)).
Render(errorMessage))))
Render(message))))
}

0 comments on commit 2a8213a

Please sign in to comment.