]> git.r.bdr.sh - rbdr/map/blobdiff - Map/MapApp.swift
Map 3 first commit: files, groups and layout
[rbdr/map] / Map / MapApp.swift
index 14e5605792713e070c0a57a4790d6a79d20d0395..9aff010b2021f042f3d7579faac0a6c7b975b616 100644 (file)
@@ -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()
     }
   }
 }