feat(home): 팔로잉 최근 대화를 연결한다
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user