feat(home): 추천 배너 섹션을 연결한다
This commit is contained in:
@@ -6,6 +6,7 @@ struct MainHomeRecommendationView: View {
|
||||
let onTapContent: (Int) -> Void
|
||||
let onTapCharacter: (Int) -> Void
|
||||
let onTapCommunity: (Int) -> Void
|
||||
let onTapBanner: (RecommendationBannerResponse) -> Void
|
||||
|
||||
@StateObject private var viewModel = MainHomeRecommendationViewModel()
|
||||
|
||||
@@ -24,6 +25,11 @@ struct MainHomeRecommendationView: View {
|
||||
items: viewModel.recommendations?.lives ?? [],
|
||||
onTapLive: onTapLive
|
||||
)
|
||||
|
||||
MainHomeBannerSection(
|
||||
items: viewModel.recommendations?.banners ?? [],
|
||||
onTapBanner: onTapBanner
|
||||
)
|
||||
}
|
||||
.padding(.vertical, SodaSpacing.s20)
|
||||
}
|
||||
@@ -49,7 +55,8 @@ struct MainHomeRecommendationView_Previews: PreviewProvider {
|
||||
onTapCreator: { _ in },
|
||||
onTapContent: { _ in },
|
||||
onTapCharacter: { _ in },
|
||||
onTapCommunity: { _ in }
|
||||
onTapCommunity: { _ in },
|
||||
onTapBanner: { _ in }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user