summaryrefslogtreecommitdiff
path: root/JuickNext
diff options
context:
space:
mode:
Diffstat (limited to 'JuickNext')
-rw-r--r--JuickNext/View/ContentView.swift15
-rw-r--r--JuickNext/View/Discussions.swift (renamed from JuickNext/View/DiscussionsView.swift)10
-rw-r--r--JuickNext/View/Today.swift5
3 files changed, 21 insertions, 9 deletions
diff --git a/JuickNext/View/ContentView.swift b/JuickNext/View/ContentView.swift
index 03916fc..e77d6e7 100644
--- a/JuickNext/View/ContentView.swift
+++ b/JuickNext/View/ContentView.swift
@@ -9,17 +9,26 @@
import SwiftUI
struct ContentView: View {
+ @Environment(\.horizontalSizeClass) private var size
var body: some View {
- TabView {
+ let view = (size == .compact) ?
+ AnyView(TabView {
Today()
.tabItem {
Image("ei-clock")
}
- Text("Discussions")
+ Discussions()
.tabItem {
Image("ei-bell")
}
- }
+ }): AnyView(NavigationView {
+ VStack {
+ Text("Discussions")
+ Text("Discover")
+ Text("Chats")
+ }
+ })
+ view
}
}
diff --git a/JuickNext/View/DiscussionsView.swift b/JuickNext/View/Discussions.swift
index b8f121b..20e7fa8 100644
--- a/JuickNext/View/DiscussionsView.swift
+++ b/JuickNext/View/Discussions.swift
@@ -1,5 +1,5 @@
//
-// DiscussionsView.swift
+// Discussions.swift
// Juick
//
// Created by Vitaly Takmazov on 14.05.2023.
@@ -8,14 +8,14 @@
import SwiftUI
-struct DiscussionsView: View {
+struct Discussions: View {
var body: some View {
- Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
+ Text("Discussions")
}
}
-struct DiscussionsView_Previews: PreviewProvider {
+struct Discussions_Previews: PreviewProvider {
static var previews: some View {
- DiscussionsView()
+ Discussions()
}
}
diff --git a/JuickNext/View/Today.swift b/JuickNext/View/Today.swift
index aa4a205..161a353 100644
--- a/JuickNext/View/Today.swift
+++ b/JuickNext/View/Today.swift
@@ -9,8 +9,11 @@
import SwiftUI
struct Today: View {
+ let title = "Today"
var body: some View {
- Text("Today")
+ NavigationView {
+ Text(title)
+ }
}
}