feat(creator): 커뮤니티 탭을 추가한다

This commit is contained in:
Yu Sung
2026-07-05 22:25:07 +09:00
parent 130b8eee40
commit f3b7d01a3f
20 changed files with 1706 additions and 2 deletions

View File

@@ -0,0 +1,59 @@
import SwiftUI
struct CreatorChannelCommunityViewModeBar: View {
let communityPostCount: Int
let viewMode: CreatorChannelCommunityViewMode
let onTapToggle: () -> Void
var body: some View {
HStack(alignment: .center, spacing: SodaSpacing.s8) {
HStack(spacing: SodaSpacing.s4) {
Text(I18n.CreatorChannelCommunity.totalLabel)
.appFont(size: 16, weight: .medium)
.foregroundColor(.white)
Text("\(communityPostCount)")
.appFont(size: 16, weight: .medium)
.foregroundColor(Color.gray500)
}
Spacer()
Button(action: onTapToggle) {
HStack(spacing: SodaSpacing.s4) {
Text(viewModeTitle)
.appFont(size: 16, weight: .regular)
.foregroundColor(Color.gray400)
Image(viewModeIconName)
.resizable()
.scaledToFit()
.frame(width: 18, height: 18)
}
.contentShape(Rectangle())
}
.buttonStyle(.plain)
}
.padding(.horizontal, SodaSpacing.s14)
.frame(height: 52)
.background(Color.black)
}
private var viewModeTitle: String {
switch viewMode {
case .list:
return I18n.CreatorChannelCommunity.listView
case .thumbnail:
return I18n.CreatorChannelCommunity.thumbnailView
}
}
private var viewModeIconName: String {
switch viewMode {
case .list:
return "ic_new_list"
case .thumbnail:
return "ic_new_grid"
}
}
}