feat(home): 팔로잉 API 데이터를 연결한다
This commit is contained in:
@@ -3,6 +3,8 @@ import SwiftUI
|
||||
struct MainHomeFollowingView: View {
|
||||
let onTapFollowingAll: () -> Void
|
||||
|
||||
@StateObject private var viewModel = MainHomeFollowingViewModel()
|
||||
|
||||
init(onTapFollowingAll: @escaping () -> Void = {}) {
|
||||
self.onTapFollowingAll = onTapFollowingAll
|
||||
}
|
||||
@@ -10,12 +12,17 @@ struct MainHomeFollowingView: View {
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
MainHomeFollowingCreatorSection(
|
||||
followingCreators: [],
|
||||
followingCreators: viewModel.response?.followingCreators ?? [],
|
||||
onTapAll: onTapFollowingAll
|
||||
)
|
||||
|
||||
MainPlaceholderTabView(title: "팔로잉")
|
||||
}
|
||||
.onAppear {
|
||||
if viewModel.hasLoaded == false {
|
||||
viewModel.fetchFollowing()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user