This commit is contained in:
Trey t
2023-07-02 21:03:54 -05:00
parent 2344bcbd6a
commit 5c66ceff9f
6 changed files with 117 additions and 69 deletions

View File

@@ -121,7 +121,8 @@ struct CompletedWorkoutView: View {
func heartRates() -> some View {
VStack {
if let heartRates = postData["heart_rates"] as? [Int] {
if let heartRates = postData["heart_rates"] as? [Int],
heartRates.count > 0 {
let avg = heartRates.reduce(0, +)/heartRates.count
HStack {
Image(systemName: "heart")