diff options
author | Vitaly Takmazov | 2024-05-15 09:38:05 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-05-15 09:38:05 +0300 |
commit | f2bf132d6df251ea7d5224d0d86c2ca5b0c02320 (patch) | |
tree | 0e3206404d934c8bff590ba1f3c757ab05192def /JuickNext/View | |
parent | 1b058af687bac9dfe8c78209fe7ba510b2d78257 (diff) |
Integrate feeds from good old `tst` 2019 project
Diffstat (limited to 'JuickNext/View')
-rw-r--r-- | JuickNext/View/ContentView.swift | 13 | ||||
-rw-r--r-- | JuickNext/View/Discussions.swift | 21 | ||||
-rw-r--r-- | JuickNext/View/Today.swift | 24 |
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() - } -} |