forked from AcaMate/AcaMate_iOS
47 lines
1.1 KiB
Swift
47 lines
1.1 KiB
Swift
//
|
|
// MainView.swift
|
|
// AcaMate
|
|
//
|
|
// Created by TAnine on 2/4/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Combine
|
|
|
|
struct MainView: View {
|
|
@EnvironmentObject var appVM: AppViewModel
|
|
@EnvironmentObject var alertController: AlertController
|
|
@State var cancellables: Set<AnyCancellable> = []
|
|
// @Binding var naviState : NaviState
|
|
|
|
@State private var myType: UserType = .Admin
|
|
|
|
var body: some View {
|
|
|
|
VStack(spacing: 0) {
|
|
Group {
|
|
switch appVM.menuName {
|
|
case .Home:
|
|
HomeView(myType: $myType)
|
|
case .Management:
|
|
ManagementView()
|
|
case .Chatting:
|
|
ChattingView(myType: $myType)
|
|
case .Calendar:
|
|
CalendarView()
|
|
case .Etc:
|
|
EtcView(myType: $myType)
|
|
}
|
|
}
|
|
// Spacer(minLength: 1)
|
|
|
|
BottomView()
|
|
.frame(maxWidth: .infinity)
|
|
}
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
|
|
}
|
|
}
|
|
|
|
|