NotificationsConfigRootView.swift 561 B

123456789101112131415161718192021
  1. import SwiftUI
  2. import Swinject
  3. extension NotificationsConfig {
  4. struct RootView: BaseView {
  5. let resolver: Resolver
  6. @StateObject var state = StateModel()
  7. var body: some View {
  8. Form {
  9. Section(header: Text("Glucose")) {
  10. Toggle("Show glucose on the app badge", isOn: $state.glucoseBadge)
  11. }
  12. }
  13. .onAppear(perform: configureView)
  14. .navigationBarTitle("Notifications")
  15. .navigationBarTitleDisplayMode(.automatic)
  16. }
  17. }
  18. }