콘텐츠 메인 - 새로운 콘텐츠 테마 새로고침 할 때 마다 중복으로 늘어나던 버그 수정

This commit is contained in:
Yu Sung 2023-12-14 18:10:47 +09:00
parent 4bc3ecd0fb
commit e782f72179
3 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ struct ContentMainNewContentView: View {
@StateObject private var viewModel = ContentMainNewContentViewModel()
var body: some View {
VStack(spacing: 16.7) {
LazyVStack(spacing: 16.7) {
HStack(spacing: 0) {
Text("새로운 콘텐츠")
.font(.custom(Font.bold.rawValue, size: 18.3))

View File

@ -44,6 +44,7 @@ final class ContentMainNewContentViewModel: ObservableObject {
let decoded = try jsonDecoder.decode(ApiResponse<[String]>.self, from: responseData)
if let data = decoded.data, decoded.success {
self.themeList.removeAll()
self.themeList.append("전체")
self.themeList.append(contentsOf: data)
} else {

View File

@ -19,7 +19,7 @@ struct ContentMainRankingView: View {
]
var body: some View {
VStack(spacing: 16.7) {
LazyVStack(spacing: 16.7) {
HStack(spacing: 0) {
Text("인기 콘텐츠")
.font(.custom(Font.bold.rawValue, size: 18.3))