Skip to content

Commit 981e498

Browse files
committed
Add read more in ArticleView
1 parent 6d8a8e8 commit 981e498

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

BoxFeed/Config.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ struct AppConfig {
1313
static let APP_NAME = "Box Feed"
1414
static let APP_LINK = "https://github.com/sameersyd/BoxFeed"
1515
// https://newsapi.org
16-
static let API_KEY = "5b6e1c3421a64bbdafe8511ea8709f04" // Add your API key here
16+
static let API_KEY = "" // Add your API key here
1717
}

BoxFeed/Screens/Article/ArticleView.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ struct ArticleView: View {
1616
@Environment(\.managedObjectContext) var moc
1717
@FetchRequest(fetchRequest: ArticleCD.getAllArticles()) var articles: FetchedResults<ArticleCD>
1818

19-
2019
var body: some View {
2120
NavigationView {
2221
ScrollView(.vertical, showsIndicators: false) {
@@ -47,6 +46,15 @@ extension ArticleView {
4746
.foregroundColor(.text_primary.opacity(0.7))
4847
.modifier(FontModifier(.regular, size: 16))
4948
.frame(maxWidth: .infinity)
49+
Button(action: viewModel.openNewsUrl) {
50+
Text("READ MORE")
51+
.foregroundColor(.white)
52+
.modifier(FontModifier(.regular, size: 14))
53+
.frame(height: 45)
54+
.frame(maxWidth: .infinity)
55+
.background(Color.text_primary)
56+
}
57+
.padding(.vertical, 12)
5058
}
5159
}
5260

0 commit comments

Comments
 (0)