feat(creator): 라이브 탭 UI를 마무리한다

This commit is contained in:
Yu Sung
2026-07-04 03:20:46 +09:00
parent abc10d7610
commit b6580e201f
11 changed files with 109 additions and 92 deletions

View File

@@ -5,21 +5,12 @@ struct CreatorChannelLiveTabView: View {
let isOwnCreatorChannel: Bool
let onTapLive: (Int) -> Void
let onTapContent: (Int) -> Void
let onTapCreateLive: () -> Void
@StateObject private var viewModel = CreatorChannelLiveViewModel()
@State private var isSortSheetPresented = false
var body: some View {
ZStack(alignment: .bottom) {
content
if isOwnCreatorChannel {
CreatorChannelLiveStartButton(action: onTapCreateLive)
.padding(.horizontal, SodaSpacing.s20)
.padding(.bottom, SodaSpacing.s20)
}
}
content
.background(Color.black)
.onAppear {
if viewModel.hasLoaded == false {
@@ -38,7 +29,6 @@ struct CreatorChannelLiveTabView: View {
private var content: some View {
VStack(spacing: 0) {
CreatorChannelSortBar(
totalCount: viewModel.response?.liveReplayContentCount ?? 0,
selectedSort: viewModel.selectedSort,
onTapSort: {
isSortSheetPresented = true
@@ -67,7 +57,7 @@ struct CreatorChannelLiveTabView: View {
.padding(.vertical, SodaSpacing.s20)
}
}
.padding(.bottom, isOwnCreatorChannel ? 96 : SodaSpacing.s20)
.padding(.bottom, isOwnCreatorChannel ? 70 : SodaSpacing.s20)
}
}
}
@@ -78,8 +68,7 @@ struct CreatorChannelLiveTabView_Previews: PreviewProvider {
creatorId: 1,
isOwnCreatorChannel: true,
onTapLive: { _ in },
onTapContent: { _ in },
onTapCreateLive: {}
onTapContent: { _ in }
)
.background(Color.black)
.previewLayout(.sizeThatFits)