Mercurial > public > lazybear
diff LazyBear/Views/Company/Helpers/KeyStatsList.swift @ 445:7d1c4dc8d1d8
Change presentationMode to Binding
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Tue, 22 Jun 2021 19:56:59 +0200 |
parents | ffbb1dbab531 |
children | 8621ba6fd457 |
line wrap: on
line diff
--- a/LazyBear/Views/Company/Helpers/KeyStatsList.swift Tue Jun 22 16:54:21 2021 +0200 +++ b/LazyBear/Views/Company/Helpers/KeyStatsList.swift Tue Jun 22 19:56:59 2021 +0200 @@ -9,9 +9,8 @@ struct KeyStatsList: View { var keyStats: KeyStatsModel - + @Binding var isPresented: Bool let displayWords: DisplayWordsModel = parseJSON("DisplayWords.json") - @Environment(\.presentationMode) var keyStatsListPresentation var body: some View { NavigationView { @@ -37,7 +36,7 @@ .navigationTitle("Key Stats") .toolbar { ToolbarItem(placement: .navigationBarLeading) { - Button(action: { keyStatsListPresentation.wrappedValue.dismiss() }) { + Button(action: { self.isPresented.toggle() }) { Image(systemName: "multiply") } @@ -96,7 +95,8 @@ exDividendDate: "2020-01-01", nextDividendDate: "2020-01-01", nextEarningsDate: "2020-01-01" - ) + ) + , isPresented: .constant(true) ) } }