summaryrefslogtreecommitdiff
path: root/Juick/Views/ContentView.swift
blob: 9a9f45b8af78eeb2ab3f26666200581579f8802a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
//  ContentView.swift
//  tst
//
//  Created by Vitaly Takmazov on 10.12.2019.
//  Copyright © 2019 com.juick. All rights reserved.
//

import SwiftUI
import Combine

struct ContentView: View {
    @State var selectedView = 0
    var body: some View {
        NavigationView {
            TabView(selection: $selectedView) {
                FeedView(url: "https://api.juick.com/messages?popular=1", type: .messages)
                    .tabItem {
                        Image("ei-clock")
                        Text("Today")
                    }.tag(0)
                FeedView(url: "https://api.juick.com/messages/discussions", type: .messages)
                    .tabItem {
                        Image("ei-bell")
                        Text("Discussions")
                    }.tag(1)
                FeedView(url: "https://api.juick.com/messages", type: .messages)
                    .tabItem {
                        Image("ei-envelope")
                        Text("Chats")
                    }.tag(2)
                FeedView(url: "https://api.juick.com/messages", type: .messages)
                    .tabItem {
                        Image("ei-search")
                        Text("Discover")
                    }.tag(3)
            }
            .navigationBarTitle("Juick", displayMode: .inline)
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}