-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActivityTabView.swift
More file actions
38 lines (32 loc) · 913 Bytes
/
ActivityTabView.swift
File metadata and controls
38 lines (32 loc) · 913 Bytes
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
//
// ActivityTabView.swift
// Stanford360
//
// Created by Kelly Bonilla Guzmán on 3/10/25.
//
// SPDX-FileCopyrightText: 2025 Stanford University
//
// SPDX-License-Identifier: MIT
//
import SwiftUI
struct ActivityTabView: View {
@State private var selectedTrackerSection: TrackerSection = .add
var body: some View {
VStack {
TrackerSegmentedPicker(selectedTrackerSection: $selectedTrackerSection)
TabView(selection: $selectedTrackerSection) {
ActivityAddView().tag(TrackerSection.add)
ActivityHistoryView().tag(TrackerSection.history)
ActivityDiscoverView().tag(TrackerSection.discover)
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
}
}
}
#Preview {
@Previewable @State var standard = Stanford360Standard()
@Previewable @State var activityManager = ActivityManager()
ActivityTabView()
.environment(standard)
.environment(activityManager)
}