fix: equal height metric cards in grid

This commit is contained in:
Cosmo
2026-03-25 11:29:11 +00:00
parent 1eafeec5fe
commit 7f0c764c1c

View File

@@ -155,6 +155,7 @@ struct DashboardView: View {
// Sleep // Sleep
if let sleep = latest?.sleep { if let sleep = latest?.sleep {
SleepCard(sleep: sleep) SleepCard(sleep: sleep)
.frame(maxHeight: .infinity)
} }
// Heart Rate // Heart Rate
@@ -167,6 +168,7 @@ struct DashboardView: View {
color: Color(hex: "ff4757"), color: Color(hex: "ff4757"),
gradientColors: [Color(hex: "ff4757"), Color(hex: "ff6b81")] gradientColors: [Color(hex: "ff4757"), Color(hex: "ff6b81")]
) )
.frame(maxHeight: .infinity)
} }
// HRV // HRV
@@ -179,11 +181,13 @@ struct DashboardView: View {
color: Color(hex: "00d4aa"), color: Color(hex: "00d4aa"),
gradientColors: [Color(hex: "00d4aa"), Color(hex: "00b894")] gradientColors: [Color(hex: "00d4aa"), Color(hex: "00b894")]
) )
.frame(maxHeight: .infinity)
} }
// Steps // Steps
if let steps = latest?.steps { if let steps = latest?.steps {
StepsCard(steps: steps.total ?? 0) StepsCard(steps: steps.total ?? 0)
.frame(maxHeight: .infinity)
} }
} }
.padding(.horizontal) .padding(.horizontal)