콘텐츠 메인 홈 탭

- 콘텐츠 업로드 버튼 추가
This commit is contained in:
Yu Sung 2025-02-22 11:21:52 +09:00
parent 665e0fc576
commit 6a2671dad0
1 changed files with 241 additions and 219 deletions

View File

@ -13,6 +13,7 @@ struct ContentMainTabHomeView: View {
var body: some View { var body: some View {
BaseView(isLoading: $viewModel.isLoading) { BaseView(isLoading: $viewModel.isLoading) {
ZStack(alignment: .bottomTrailing) {
ScrollView(.vertical, showsIndicators: false) { ScrollView(.vertical, showsIndicators: false) {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 0) { HStack(spacing: 0) {
@ -255,6 +256,27 @@ struct ContentMainTabHomeView: View {
viewModel.fetchData() viewModel.fetchData()
} }
} }
if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue {
HStack(spacing: 5) {
Image("ic_thumb_play")
.resizable()
.frame(width: 20, height: 20)
Text("콘텐츠 업로드")
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(.white)
}
.padding(13.3)
.background(Color(hex: "3bb9f1"))
.cornerRadius(44)
.padding(.trailing, 16.7)
.padding(.bottom, 16.7)
.onTapGesture {
AppState.shared.setAppStep(step: .createContent)
}
}
}
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .bottom, autohideIn: 2) { .popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .bottom, autohideIn: 2) {
HStack { HStack {
Spacer() Spacer()