forked from AcaMate/AcaMate_iOS
55 lines
1.5 KiB
Swift
55 lines
1.5 KiB
Swift
//
|
|
// ChattingView.swift
|
|
// AcaMate
|
|
//
|
|
// Created by TAnine on 2/11/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ChattingView: View {
|
|
@StateObject private var topVM = TopViewModel()
|
|
|
|
@State private var scrollOffset: CGPoint = .zero
|
|
var body: some View {
|
|
|
|
VStack(spacing: 0) {
|
|
TopView(topVM: topVM)
|
|
|
|
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
|
VStack(spacing: 24) {
|
|
Group {
|
|
DashBoardView(image: Image(.Icon.group), title: "클래스") {
|
|
|
|
}
|
|
DashBoardView(image: Image(.Icon.talk), title: "선생님과 1:1") {
|
|
|
|
}
|
|
}
|
|
.background {
|
|
RoundedRectangle(cornerRadius: 8)
|
|
.foregroundStyle(Color(.Other.cell))
|
|
}
|
|
}
|
|
.padding(24)
|
|
}
|
|
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
}
|
|
.onAppear {
|
|
topVM.titleName = ""
|
|
topVM.setLeftBtn(size: CGPoint(x: 40, y: 40), action: leftAct)
|
|
topVM.setRightBtn(size: CGPoint(x: 40, y: 40), action: rightAct)
|
|
}
|
|
}
|
|
|
|
func leftAct() {
|
|
printLog("왼쪽 버튼 클릭")
|
|
}
|
|
func rightAct() {
|
|
printLog("오른쪽 버튼 클릭")
|
|
}
|
|
}
|
|
|