summaryrefslogtreecommitdiff
path: root/JuickNext/View
diff options
context:
space:
mode:
Diffstat (limited to 'JuickNext/View')
-rw-r--r--JuickNext/View/ContentView.swift13
-rw-r--r--JuickNext/View/Discussions.swift21
-rw-r--r--JuickNext/View/Today.swift24
3 files changed, 9 insertions, 49 deletions
diff --git a/JuickNext/View/ContentView.swift b/JuickNext/View/ContentView.swift
index e77d6e7..22e74e0 100644
--- a/JuickNext/View/ContentView.swift
+++ b/JuickNext/View/ContentView.swift
@@ -10,17 +10,22 @@ import SwiftUI
struct ContentView: View {
@Environment(\.horizontalSizeClass) private var size
+
+ let today = FeedView("Today", url: "https://api.juick.com/messages?popular=1")
+ let discussions = FeedView("Discussions", url: "https://api.juick.com/messages/discussions")
+ let discover = FeedView("Discover", url: "https://api.juick.com/messages")
var body: some View {
let view = (size == .compact) ?
AnyView(TabView {
- Today()
- .tabItem {
+ today.tabItem {
Image("ei-clock")
}
- Discussions()
- .tabItem {
+ discussions.tabItem {
Image("ei-bell")
}
+ discover.tabItem {
+ Image("Discover")
+ }
}): AnyView(NavigationView {
VStack {
Text("Discussions")
diff --git a/JuickNext/View/Discussions.swift b/JuickNext/View/Discussions.swift
deleted file mode 100644
index 20e7fa8..0000000
--- a/JuickNext/View/Discussions.swift
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// Discussions.swift
-// Juick
-//
-// Created by Vitaly Takmazov on 14.05.2023.
-// Copyright © 2023 com.juick. All rights reserved.
-//
-
-import SwiftUI
-
-struct Discussions: View {
- var body: some View {
- Text("Discussions")
- }
-}
-
-struct Discussions_Previews: PreviewProvider {
- static var previews: some View {
- Discussions()
- }
-}
diff --git a/JuickNext/View/Today.swift b/JuickNext/View/Today.swift
deleted file mode 100644
index 161a353..0000000
--- a/JuickNext/View/Today.swift
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// TodayView.swift
-// Juick
-//
-// Created by Vitaly Takmazov on 14.05.2023.
-// Copyright © 2023 com.juick. All rights reserved.
-//
-
-import SwiftUI
-
-struct Today: View {
- let title = "Today"
- var body: some View {
- NavigationView {
- Text(title)
- }
- }
-}
-
-struct Today_Previews: PreviewProvider {
- static var previews: some View {
- Today()
- }
-}