feat(creator): 팬Talk 쓰기 화면을 연결한다

This commit is contained in:
Yu Sung
2026-07-06 22:54:20 +09:00
parent d129583d3b
commit 9c4c304fc6
11 changed files with 716 additions and 10 deletions

View File

@@ -291,7 +291,8 @@ struct CreatorChannelView: View {
creatorId: creatorId,
isOwnCreatorChannel: isOwnCreatorChannel,
viewModel: fanTalkViewModel,
onTapWrite: showFanTalkWriteView
onTapWrite: showFanTalkWriteView,
onTapEdit: showFanTalkModifyView
)
} else if viewModel.selectedTab == .community {
CreatorChannelCommunityTabView(
@@ -599,7 +600,35 @@ struct CreatorChannelView: View {
communityViewModel.selectedPostId = 0
}
private func showFanTalkWriteView() {}
private func showFanTalkWriteView() {
AppState.shared.setAppStep(
step: .creatorChannelFanTalkWrite(
creatorId: creatorId,
mode: .write,
fanTalkId: nil,
initialContent: "",
onSuccess: {
viewModel.fetchHome(creatorId: creatorId)
fanTalkViewModel.fetchFirstPage(creatorId: creatorId)
}
)
)
}
private func showFanTalkModifyView(_ fanTalk: CreatorChannelFanTalkItemResponse) {
AppState.shared.setAppStep(
step: .creatorChannelFanTalkWrite(
creatorId: creatorId,
mode: .modify(fanTalkId: fanTalk.fanTalkId, initialContent: fanTalk.content),
fanTalkId: fanTalk.fanTalkId,
initialContent: fanTalk.content,
onSuccess: {
viewModel.fetchHome(creatorId: creatorId)
fanTalkViewModel.fetchFirstPage(creatorId: creatorId)
}
)
)
}
}
struct CreatorChannelView_Previews: PreviewProvider {