summaryrefslogtreecommitdiff
path: root/Sora/Views/MainView.swift
blob: c6575402328096c8df12055f2ba798e9c54cdbf2 (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
import SwiftUI

struct MainView: View {
    @EnvironmentObject var settings: Settings

    var body: some View {
        #if os(macOS)
            ContentView()
                .environmentObject(settings)
        #else
            TabView {
                ContentView()
                    .tabItem {
                        Label("Posts", systemImage: "rectangle.stack")
                    }

                NavigationStack {
                    SettingsView()
                }
                .tabItem {
                    Label("Settings", systemImage: "gear")
                }
            }
            .environmentObject(settings)
        #endif
    }
}