콘텐츠 메인 - 새로운 콘텐츠 테마 새로고침 할 때 마다 중복으로 늘어나던 버그 수정
This commit is contained in:
parent
4bc3ecd0fb
commit
e782f72179
|
@ -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))
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue