X-Git-Url: https://git.r.bdr.sh/rbdr/map/blobdiff_plain/fdb4633d3e9158e457d57e820df6e1efb4df39c2..733a96675eb34c5d838232892877cc185c7257bf:/Map/MapApp.swift diff --git a/Map/MapApp.swift b/Map/MapApp.swift index 14e5605..9aff010 100644 --- a/Map/MapApp.swift +++ b/Map/MapApp.swift @@ -1,23 +1,12 @@ -// -// MapApp.swift -// Map -// -// Created by Ruben Beltran del Rio on 2/1/21. -// - import SwiftUI @main struct MapApp: App { - let persistenceController = PersistenceController.shared - var body: some Scene { - WindowGroup { - MapEditorWindow() - .environment(\.managedObjectContext, persistenceController.container.viewContext) - .environmentObject(AppStore(initialState: AppState(), reducer: appStateReducer)) - }.windowStyle(HiddenTitleBarWindowStyle()).commands { - SidebarCommands() + DocumentGroup(newDocument: MapDocument()) { file in + MapEditor(document: file.$document, url: file.fileURL) + }.commands { + MapCommands() } } }