From b1a176ba3da2c7cf815084f0f8109008fe763809 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Mon, 4 Dec 2023 14:31:12 -0800 Subject: Starting to get app views displaying data (roughly) --- Hotline/Views/AgreementView.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Hotline/Views/AgreementView.swift') diff --git a/Hotline/Views/AgreementView.swift b/Hotline/Views/AgreementView.swift index c61c9d7..39730ce 100644 --- a/Hotline/Views/AgreementView.swift +++ b/Hotline/Views/AgreementView.swift @@ -1,11 +1,13 @@ import SwiftUI struct AgreementView: View { - @Environment(\.dismiss) var dismiss + @Environment(HotlineState.self) private var appState let text: String var body: some View { +// @Bindable var config = appState + VStack(alignment: .leading) { ScrollView { VStack(alignment: .leading) { @@ -18,11 +20,14 @@ struct AgreementView: View { } Button("OK") { print("DONE") + appState.dismissAgreement() } .bold() .padding(EdgeInsets(top: 16, leading: 24, bottom: 16, trailing: 24)) .frame(maxWidth: .infinity) } + .presentationDetents([.fraction(0.6)]) + .presentationDragIndicator(.visible) } } -- cgit