Mercurial > public > lazybear
diff LazyBear/Views/Company/Helpers/NewsList.swift @ 447:8621ba6fd457
Fixes #48
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Wed, 23 Jun 2021 10:54:47 +0200 |
parents | 7d1c4dc8d1d8 |
children |
line wrap: on
line diff
--- a/LazyBear/Views/Company/Helpers/NewsList.swift Tue Jun 22 19:57:08 2021 +0200 +++ b/LazyBear/Views/Company/Helpers/NewsList.swift Wed Jun 23 10:54:47 2021 +0200 @@ -9,31 +9,20 @@ struct NewsList: View { var latestNews: [LatestNewsModel] - @Binding var isPresented: Bool var body: some View { - NavigationView { - ScrollView(showsIndicators: false) { - VStack { - ForEach(latestNews, id: \.self) { new in - if !new.headline.isEmpty { - NewsRow(new: new) - Divider() - .padding() - - } - } - } - .padding() - } - .navigationTitle("Latest news") - .toolbar { - ToolbarItem(placement: .cancellationAction) { - Button(action: { self.isPresented.toggle() }) { - Image(systemName: "multiply") + ScrollView(showsIndicators: false) { + VStack { + ForEach(latestNews, id: \.self) { new in + if !new.headline.isEmpty { + NewsRow(new: new) + Divider() + .padding() + } } } + .padding() } } } @@ -50,7 +39,6 @@ summary: "https://www.investing.com/news/stock-market-news", url: "https://cloud.iexapis.com/v1/news/article/99abeb99-6d9e-47c8-ae7b-53404eacccec") ] - , isPresented: .constant(true) ) } }