Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ final class AnalyticsHubHostingViewController: UIHostingController<AnalyticsHubV
///
struct AnalyticsHubView: View {

/// Environment safe areas
@Environment(\.safeAreaInsets) var safeAreaInsets: EdgeInsets

@StateObject var viewModel: AnalyticsHubViewModel

var body: some View {
Expand All @@ -29,6 +32,7 @@ struct AnalyticsHubView: View {
Divider()
Text("Placeholder for Time Range Selection")
.padding(.leading)
.padding(.horizontal, insets: safeAreaInsets)
.frame(maxWidth: .infinity, minHeight: 84, alignment: .leading)
.background(Color(uiColor: .listForeground))

Expand All @@ -40,7 +44,8 @@ struct AnalyticsHubView: View {
Divider()

AnalyticsReportCard(viewModel: viewModel.revenueCard)
.background(Color(uiColor: .listForeground))
.padding(.horizontal, insets: safeAreaInsets)
.background(Color(uiColor: .listForeground))

Divider()
}
Expand All @@ -49,7 +54,8 @@ struct AnalyticsHubView: View {
Divider()

AnalyticsReportCard(viewModel: viewModel.ordersCard)
.background(Color(uiColor: .listForeground))
.padding(.horizontal, insets: safeAreaInsets)
.background(Color(uiColor: .listForeground))

Divider()
}
Expand All @@ -60,6 +66,7 @@ struct AnalyticsHubView: View {
.navigationTitle(Localization.title)
.navigationBarTitleDisplayMode(.inline)
.background(Color(uiColor: .listBackground))
.edgesIgnoringSafeArea(.horizontal)
}
}

Expand Down