Source code for the WriteFreely SwiftUI app for iOS, iPadOS, and macOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
914 B

  1. import SwiftUI
  2. struct SidebarView: View {
  3. var body: some View {
  4. CollectionListView()
  5. }
  6. }
  7. struct SidebarView_Previews: PreviewProvider {
  8. static var previews: some View {
  9. let userCollection1 = WFACollection(context: PersistenceManager.persistentContainer.viewContext)
  10. let userCollection2 = WFACollection(context: PersistenceManager.persistentContainer.viewContext)
  11. let userCollection3 = WFACollection(context: PersistenceManager.persistentContainer.viewContext)
  12. userCollection1.title = "Collection 1"
  13. userCollection2.title = "Collection 2"
  14. userCollection3.title = "Collection 3"
  15. let model = WriteFreelyModel()
  16. model.collections = CollectionListModel()
  17. return SidebarView()
  18. .environmentObject(model)
  19. .environment(\.managedObjectContext, PersistenceManager.persistentContainer.viewContext)
  20. }
  21. }