콘텐츠 상세 - 언어 설정에 따라 번역 데이터를 표시하도록 수정
This commit is contained in:
@@ -80,7 +80,7 @@ struct ContentDetailInfoView: View {
|
||||
}
|
||||
}
|
||||
|
||||
Text(audioContent.title)
|
||||
Text(audioContent.translated?.title ?? audioContent.title)
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color.grayd2)
|
||||
.lineSpacing(5)
|
||||
@@ -156,13 +156,13 @@ struct ContentDetailInfoView: View {
|
||||
ZStack {
|
||||
VStack(spacing: 8) {
|
||||
if audioContent.tag.count > 0 {
|
||||
Text(audioContent.tag)
|
||||
Text(audioContent.translated?.tags ?? audioContent.tag)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color.button)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
Text(audioContent.detail)
|
||||
Text(audioContent.translated?.detail ?? audioContent.detail)
|
||||
.font(.custom(Font.medium.rawValue, size: 14))
|
||||
.foregroundColor(Color.gray90)
|
||||
.lineLimit(isExpandDescription ? nil : 3)
|
||||
|
||||
@@ -42,6 +42,7 @@ struct GetAudioContentDetailResponse: Decodable {
|
||||
let nextContent: OtherContentResponse?
|
||||
let buyerList: [ContentBuyer]
|
||||
let isAvailableUsePoint: Bool
|
||||
let translated: TranslatedContent?
|
||||
}
|
||||
|
||||
enum OrderType: String, Codable {
|
||||
@@ -67,3 +68,9 @@ struct ContentBuyer: Decodable {
|
||||
let nickname: String
|
||||
let profileImageUrl: String
|
||||
}
|
||||
|
||||
struct TranslatedContent: Decodable {
|
||||
let title: String?
|
||||
let detail: String?
|
||||
let tags: String?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user