feat(character): 인기 캐릭터 섹션 추가

This commit is contained in:
Yu Sung
2025-09-11 21:23:46 +09:00
parent 73ec0ce12e
commit 112d75084e
6 changed files with 66 additions and 28 deletions

View File

@@ -35,11 +35,23 @@ struct CharacterView: View {
}
}
//
if !viewModel.popularCharacters.isEmpty {
CharacterSectionView(
title: "인기 캐릭터",
items: viewModel.popularCharacters,
isShowRank: true
) { ch in
onSelectCharacter(ch.characterId)
}
}
//
if !viewModel.newCharacters.isEmpty {
CharacterSectionView(
title: "신규 캐릭터",
items: viewModel.newCharacters
items: viewModel.newCharacters,
isShowRank: false
) { ch in
onSelectCharacter(ch.characterId)
}
@@ -52,7 +64,8 @@ struct CharacterView: View {
let section = viewModel.curations[idx]
CharacterSectionView(
title: section.title,
items: section.characters
items: section.characters,
isShowRank: false
) { ch in
onSelectCharacter(ch.characterId)
}