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:
@@ -20,10 +20,16 @@ struct DashboardView: View {
|
||||
// Summary stats
|
||||
statsGrid
|
||||
|
||||
// Study time + Activity side by side
|
||||
HStack(alignment: .top, spacing: 12) {
|
||||
studyTimeCard
|
||||
streakCalendar
|
||||
// Study time + Activity — side by side on iPad, stacked on iPhone
|
||||
ViewThatFits(in: .horizontal) {
|
||||
HStack(alignment: .top, spacing: 12) {
|
||||
studyTimeCard
|
||||
streakCalendar
|
||||
}
|
||||
VStack(spacing: 12) {
|
||||
studyTimeCard
|
||||
streakCalendar
|
||||
}
|
||||
}
|
||||
|
||||
// Accuracy chart
|
||||
|
||||
Reference in New Issue
Block a user