1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-31 20:17:24 +01:00
metatext-app-ios-iphone-ipad/Views/SwiftUI/View Controller Representables/MainNavigationView.swift
Justin Mazzocchi ff8fd63e50
Organize views
2021-01-28 22:50:58 -08:00

31 lines
855 B
Swift

// Copyright © 2021 Metabolist. All rights reserved.
import SwiftUI
import ViewModels
struct MainNavigationView: UIViewControllerRepresentable {
let viewModelClosure: () -> NavigationViewModel
@EnvironmentObject var rootViewModel: RootViewModel
func makeUIViewController(context: Context) -> MainNavigationViewController {
MainNavigationViewController(
viewModel: viewModelClosure(),
rootViewModel: rootViewModel)
}
func updateUIViewController(_ uiViewController: MainNavigationViewController, context: Context) {
}
}
#if DEBUG
import PreviewViewModels
struct MainNavigationView_Previews: PreviewProvider {
static var previews: some View {
MainNavigationView { NavigationViewModel(identityContext: .preview) }
.environmentObject(RootViewModel.preview)
}
}
#endif