feat(chat-character): 큐레이션 영역 제거
This commit is contained in:
@@ -10,5 +10,4 @@ struct CharacterHomeResponse: Decodable {
|
|||||||
let recentCharacters: [RecentCharacter]
|
let recentCharacters: [RecentCharacter]
|
||||||
let popularCharacters: [Character]
|
let popularCharacters: [Character]
|
||||||
let newCharacters: [Character]
|
let newCharacters: [Character]
|
||||||
let curationSections: [CurationSection]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,23 +63,6 @@ struct CharacterView: View {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 큐레이션 섹션 (여러 섹션)
|
|
||||||
if !viewModel.curations.isEmpty {
|
|
||||||
VStack(alignment: .leading, spacing: 48) {
|
|
||||||
ForEach(viewModel.curations.indices, id: \.self) { idx in
|
|
||||||
let section = viewModel.curations[idx]
|
|
||||||
CharacterSectionView(
|
|
||||||
title: section.title,
|
|
||||||
items: section.characters,
|
|
||||||
isShowRank: false,
|
|
||||||
onTap: { ch in
|
|
||||||
onSelectCharacter(ch.characterId)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.padding(.bottom, 24)
|
.padding(.bottom, 24)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ final class CharacterViewModel: ObservableObject {
|
|||||||
@Published private(set) var recentCharacters: [RecentCharacter] = []
|
@Published private(set) var recentCharacters: [RecentCharacter] = []
|
||||||
@Published private(set) var popularCharacters: [Character] = []
|
@Published private(set) var popularCharacters: [Character] = []
|
||||||
@Published private(set) var newCharacters: [Character] = []
|
@Published private(set) var newCharacters: [Character] = []
|
||||||
@Published private(set) var curations: [CurationSection] = []
|
|
||||||
|
|
||||||
@Published var isLoading: Bool = false
|
@Published var isLoading: Bool = false
|
||||||
@Published var errorMessage: String = ""
|
@Published var errorMessage: String = ""
|
||||||
@@ -49,7 +48,6 @@ final class CharacterViewModel: ObservableObject {
|
|||||||
self.recentCharacters = data.recentCharacters
|
self.recentCharacters = data.recentCharacters
|
||||||
self.popularCharacters = data.popularCharacters
|
self.popularCharacters = data.popularCharacters
|
||||||
self.newCharacters = data.newCharacters
|
self.newCharacters = data.newCharacters
|
||||||
self.curations = data.curationSections.filter { !$0.characters.isEmpty }
|
|
||||||
} else {
|
} else {
|
||||||
if let message = decoded.message {
|
if let message = decoded.message {
|
||||||
self.errorMessage = message
|
self.errorMessage = message
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
//
|
|
||||||
// CurationSection.swift
|
|
||||||
// SodaLive
|
|
||||||
//
|
|
||||||
// Created by klaus on 8/29/25.
|
|
||||||
//
|
|
||||||
|
|
||||||
struct CurationSection: Decodable {
|
|
||||||
let characterCurationId: Int
|
|
||||||
let title: String
|
|
||||||
let characters: [Character]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user