fix(times): Don't start bubbletea table if time log slice is empty (fix #15)

This commit is contained in:
Noah 2024-04-07 14:15:16 -05:00
parent df48225954
commit d434ff273b

View File

@ -39,12 +39,16 @@ func times() {
duration: took,
})
})
p.Send(IndicatorInfo{
info: "Done!",
quitting: true,
})
finished = true
p.Send(IndicatorInfo{info: "Done", quitting: true})
p.Quit()
p.Wait()
if len(times) == 0 {
fmt.Printf("No time logs found for the specified date!\n")
os.Exit(0)
}
var total_time time.Duration