Use ViewThatFits for study time and activity cards layout

Side by side on iPad, stacked vertically on iPhone. Fixes
calendar grid overflowing on narrow screens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-04-13 16:28:02 -05:00
parent a3807faf2d
commit a3318adf5e

View File

@@ -20,10 +20,16 @@ struct DashboardView: View {
// Summary stats // Summary stats
statsGrid statsGrid
// Study time + Activity side by side // Study time + Activity side by side on iPad, stacked on iPhone
HStack(alignment: .top, spacing: 12) { ViewThatFits(in: .horizontal) {
studyTimeCard HStack(alignment: .top, spacing: 12) {
streakCalendar studyTimeCard
streakCalendar
}
VStack(spacing: 12) {
studyTimeCard
streakCalendar
}
} }
// Accuracy chart // Accuracy chart