Skip to content

Commit 460a5ed

Browse files
committed
better price formatting
1 parent 9db4e37 commit 460a5ed

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

ui/pages/ShowRestaurant.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,12 @@ func (m ShowRestaurantModel) View() tea.View {
9595
// Dishes per tab
9696
var dishes []string
9797
for _, dish := range m.scrapedRestaurant.Week.Days[m.activeDayTab].Dishes {
98-
price := fmt.Sprintf("%.2f", dish.Price)
9998
tags := ""
10099
if len(dish.Tags) > 0 {
101100
tags = " - "
102101
tags += strings.Join(dish.Tags, ", ")
103102
}
104-
dishes = append(dishes, styles.Border.Render(styles.Text.Render(fmt.Sprintf("%v - %v\n%v%v", dish.Name, price, dish.Description, tags))))
103+
dishes = append(dishes, styles.Border.Render(styles.Text.Render(fmt.Sprintf("%v - %.2f\n%v%v", dish.Name, dish.Price, dish.Description, tags))))
105104
}
106105

107106
text += strings.Join(dishes, "\n")

0 commit comments

Comments
 (0)