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
|
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user