mirror of
https://github.com/wahyd4/links.git
synced 2026-08-09 05:06:16 +10:00
35 lines
882 B
Swift
35 lines
882 B
Swift
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@Environment(\.managedObjectContext) private var viewContext
|
|
@StateObject private var linkViewModel = LinkViewModel()
|
|
|
|
var body: some View {
|
|
TabView {
|
|
LinkListView()
|
|
.tabItem {
|
|
Image(systemName: "link")
|
|
Text("links")
|
|
}
|
|
|
|
SearchView()
|
|
.tabItem {
|
|
Image(systemName: "magnifyingglass")
|
|
Text("search")
|
|
}
|
|
|
|
AnalyticsView()
|
|
.tabItem {
|
|
Image(systemName: "chart.bar")
|
|
Text("analytics")
|
|
}
|
|
}
|
|
.environmentObject(linkViewModel)
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
ContentView()
|
|
.environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)
|
|
}
|