import SwiftUI extension Home { struct RootView: BaseView { @EnvironmentObject var viewModel: ViewModel var body: some View { VStack { Spacer() Button(action: viewModel.addCarbs) { Text("Add carbs") .frame(maxWidth: .infinity) .foregroundColor(.white) .buttonBackground() } Button(action: viewModel.addTempTarget) { Text("Add temp target") .frame(maxWidth: .infinity) .foregroundColor(.white) .buttonBackground() } Button(action: viewModel.runLoop) { Text("Run loop") .frame(maxWidth: .infinity) .foregroundColor(.white) .buttonBackground() } Spacer() } .padding() .navigationTitle("Home") .navigationBarTitleDisplayMode(.automatic) } } }