feat(creator): 스케줄 섹션을 연결한다

This commit is contained in:
Yu Sung
2026-07-03 13:59:50 +09:00
parent 610f0eee4b
commit 0775b17fd4
5 changed files with 295 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ struct CreatorChannelView: View {
selectedTabContent
}
}
.ignoresSafeArea(.container, edges: .vertical)
.ignoresSafeArea(.container, edges: .top)
if isTabBarSticky {
tabBar
@@ -156,8 +156,10 @@ struct CreatorChannelView: View {
CreatorChannelHomeView(
response: response,
onSelectTab: selectTab,
onTapLive: showLiveDetail,
onTapContent: showContentDetail,
onTapDonate: showDonationDialog
onTapDonate: showDonationDialog,
onTapSchedule: handleScheduleTap
)
} else {
CreatorChannelPlaceholderTabView(title: viewModel.selectedTab.title)
@@ -182,9 +184,43 @@ struct CreatorChannelView: View {
}
private func showContentDetail(_ contentId: Int) {
guard contentId > 0 else { return }
AppState.shared.setAppStep(step: .contentDetail(contentId: contentId))
}
private func showLiveDetail(_ roomId: Int) {
guard roomId > 0 else { return }
AppState.shared.setAppStep(
step: .liveDetail(
roomId: roomId,
onClickParticipant: {},
onClickReservation: {},
onClickStart: {},
onClickCancel: {}
)
)
}
private func showCommunity(_ creatorId: Int) {
guard creatorId > 0 else { return }
AppState.shared.setAppStep(step: .creatorCommunityAll(creatorId: creatorId))
}
private func handleScheduleTap(type: CreatorActivityType, targetId: Int) {
guard targetId > 0 else { return }
switch type {
case .live, .liveReplay:
showLiveDetail(targetId)
case .audio:
showContentDetail(targetId)
case .community:
showCommunity(targetId)
case .unknown:
return
}
}
private func showDonationDialog() {
guard let creatorId = viewModel.response?.creator.creatorId else { return }
channelDonationViewModel.setCreatorId(creatorId, shouldFetch: false)