feat(home): 팔로잉 최근 대화를 연결한다

This commit is contained in:
Yu Sung
2026-07-01 11:43:45 +09:00
parent 5761d6083b
commit 772af3dfe3
7 changed files with 194 additions and 10 deletions

View File

@@ -4,17 +4,23 @@ struct MainHomeFollowingView: View {
let onTapLive: (Int) -> Void
let onTapCreator: (Int) -> Void
let onTapFollowingAll: () -> Void
let onTapChatTab: () -> Void
let onTapChatRoom: (Int) -> Void
@StateObject private var viewModel = MainHomeFollowingViewModel()
init(
onTapLive: @escaping (Int) -> Void = { _ in },
onTapCreator: @escaping (Int) -> Void = { _ in },
onTapFollowingAll: @escaping () -> Void = {}
onTapFollowingAll: @escaping () -> Void = {},
onTapChatTab: @escaping () -> Void = {},
onTapChatRoom: @escaping (Int) -> Void = { _ in }
) {
self.onTapLive = onTapLive
self.onTapCreator = onTapCreator
self.onTapFollowingAll = onTapFollowingAll
self.onTapChatTab = onTapChatTab
self.onTapChatRoom = onTapChatRoom
}
var body: some View {
@@ -30,6 +36,14 @@ struct MainHomeFollowingView: View {
onTapLive: onTapLive
)
if let recentChats = viewModel.response?.recentChats, !recentChats.isEmpty {
MainHomeFollowingChatSection(
recentChats: recentChats,
onTapTitle: onTapChatTab,
onTapChatRoom: onTapChatRoom
)
}
MainPlaceholderTabView(title: "팔로잉")
}
.onAppear {