Jotley / app / macOS / Views / NotesListView+PreviewAndAlerts.swift
| 1 | import SwiftUI |
| 2 | import AppKit |
| 3 | struct AlertModifier: ViewModifier { |
| 4 | @ObservedObject var viewModel: NotesListViewModel |
| 5 | func body(content: Content) -> some View { |
| 6 | content.alert("Jotley", isPresented: $viewModel.showSyncError) { |
| 7 | Button("OK", role: .cancel) {} |
| 8 | } message: { Text(viewModel.syncErrorMessage) } |
| 9 | } |
| 10 | } |