feat(home): 장르 크리에이터 섹션을 연결한다
This commit is contained in:
@@ -7,6 +7,7 @@ struct MainHomeRecommendationView: View {
|
||||
let onTapCharacter: (Int) -> Void
|
||||
let onTapCommunity: (Int) -> Void
|
||||
let onTapBanner: (RecommendationBannerResponse) -> Void
|
||||
let onTapFollowAll: (@escaping () -> Void) -> Void
|
||||
|
||||
@StateObject private var viewModel = MainHomeRecommendationViewModel()
|
||||
|
||||
@@ -47,6 +48,18 @@ struct MainHomeRecommendationView: View {
|
||||
items: viewModel.recommendations?.aiCharacters ?? [],
|
||||
onTapCharacter: onTapCharacter
|
||||
)
|
||||
|
||||
MainHomeGenreCreatorSection(
|
||||
items: viewModel.recommendations?.genreCreators ?? [],
|
||||
isFollowAllCompleted: viewModel.isFollowAllCompleted,
|
||||
isFollowAllLoading: viewModel.isFollowAllLoading,
|
||||
onTapCreator: onTapCreator,
|
||||
onTapFollowAll: { creatorIds, completionKey in
|
||||
onTapFollowAll {
|
||||
viewModel.followAll(creatorIds: creatorIds, completionKey: completionKey)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
.padding(.vertical, SodaSpacing.s20)
|
||||
}
|
||||
@@ -73,7 +86,8 @@ struct MainHomeRecommendationView_Previews: PreviewProvider {
|
||||
onTapContent: { _ in },
|
||||
onTapCharacter: { _ in },
|
||||
onTapCommunity: { _ in },
|
||||
onTapBanner: { _ in }
|
||||
onTapBanner: { _ in },
|
||||
onTapFollowAll: { action in action() }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user