blob: 713691f8d0649959c4999c5cdc282a8c5910d8ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import SwiftUI
struct HotlineView: View {
@Environment(HotlineState.self) private var appState
@Environment(HotlineClient.self) private var hotline
@Environment(HotlineTrackerClient.self) private var tracker
var body: some View {
@Bindable var config = appState
NavigationStack {
TrackerView()
}
.sheet(isPresented: $config.agreementPresented) {
AgreementView(text: hotline.agreement!)
}
}
}
#Preview {
HotlineView()
.environment(HotlineClient())
.environment(HotlineTrackerClient(tracker: HotlineTracker("hltracker.com")))
}
|