Mercurial > public > lazybear
diff LazyBear/Views/Company/Helpers/NewsHelper.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 | c6913f0ce46e |
line wrap: on
line diff
--- a/LazyBear/Views/Company/Helpers/NewsHelper.swift Tue Jun 22 19:57:08 2021 +0200 +++ b/LazyBear/Views/Company/Helpers/NewsHelper.swift Wed Jun 23 10:54:47 2021 +0200 @@ -10,8 +10,6 @@ struct NewsHelper: View { var latestNews: [LatestNewsModel] - @State private var showList = false - var body: some View { VStack(alignment: .leading) { HStack { @@ -20,7 +18,13 @@ .fontWeight(.semibold) Spacer() - Button("See all", action: { showList = true } ) + + NavigationLink(destination: NewsList(latestNews: latestNews) + .navigationTitle("Latest news") + ) { + Text("See all") + .accentColor(Color(.systemBlue)) + } } .padding(.bottom) @@ -36,9 +40,6 @@ .background( CustomRectangleBox() ) - .sheet(isPresented: $showList) { - NewsList(latestNews: latestNews, isPresented: $showList) - } } }