summaryrefslogtreecommitdiff
path: root/JuickNext/View/ContentView.swift
blob: e77d6e72d18d89d5f4510a85171370d9a4ff9d45 (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
//
//  ContentView.swift
//  Juick
//
//  Created by Vitaly Takmazov on 14.05.2023.
//  Copyright © 2023 com.juick. All rights reserved.
//

import SwiftUI

struct ContentView: View {
    @Environment(\.horizontalSizeClass) private var size
    var body: some View {
        let view = (size == .compact) ?
        AnyView(TabView {
            Today()
                .tabItem {
                    Image("ei-clock")
                }
            Discussions()
                .tabItem {
                    Image("ei-bell")
                }
        }): AnyView(NavigationView {
            VStack {
                Text("Discussions")
                Text("Discover")
                Text("Chats")
            }
        })
        view
    }
}

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