-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathMainTabView.swift
More file actions
47 lines (40 loc) · 826 Bytes
/
MainTabView.swift
File metadata and controls
47 lines (40 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// MainTabView.swift
// OCKSample
//
// Created by Corey Baker on 4/15/25.
// Copyright © 2025 Network Reconnaissance Lab. All rights reserved.
//
import CareKitUI
import SwiftUI
struct MainTabView: View {
@ObservedObject var loginViewModel: LoginViewModel
var body: some View {
TabView {
CareView()
.tabItem {
Text(careTabName)
}
ProfileView()
.tabItem {
Text(profileTabName)
}
}
.task {
await loginViewModel.checkStatus()
}
}
private var careTabName: LocalizedStringKey {
"CARE"
}
private var profileTabName: LocalizedStringKey {
"PROFILE"
}
}
struct MainTabView_Previews: PreviewProvider {
static var previews: some View {
MainTabView(loginViewModel: .init())
.environment(\.careStore, Utility.createPreviewStore())
.careKitStyle(Styler())
}
}