Mercurial > public > lazybear
diff LazyBear/Views/Company/Helpers/InsiderRosterList.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/InsiderRosterList.swift Tue Jun 22 16:54:21 2021 +0200 +++ b/LazyBear/Views/Company/Helpers/InsiderRosterList.swift Tue Jun 22 19:56:59 2021 +0200 @@ -9,7 +9,7 @@ struct InsiderRosterList: View { var insiderRoster: [InsiderRosterModel] - @Environment(\.presentationMode) private var insiderRosterListPresentation + @Binding var isPresented: Bool var body: some View { NavigationView { @@ -27,7 +27,7 @@ .navigationTitle("Top 10 Insiders") .toolbar { ToolbarItem(placement: .cancellationAction) { - Button(action: { insiderRosterListPresentation.wrappedValue.dismiss() }) { + Button(action: { self.isPresented.toggle() }) { Image(systemName: "multiply") } } @@ -47,6 +47,7 @@ reportDate: 12345 ) ] + , isPresented: .constant(true) ) } }