콘텐츠 배너

- 시리즈에 연결되는 배너 타입 추가
This commit is contained in:
Yu Sung 2025-01-17 14:35:46 +09:00
parent 4a552dabe2
commit 1d3350d498
2 changed files with 6 additions and 1 deletions

View File

@ -40,6 +40,8 @@ struct ContentMainBannerView: View {
AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!)) AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!))
case .CREATOR: case .CREATOR:
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!)) AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!))
case .SERIES:
AppState.shared.setAppStep(step: .seriesDetail(seriesId: item.seriesId!))
case .LINK: case .LINK:
if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) { if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url) UIApplication.shared.open(url)
@ -68,6 +70,8 @@ struct ContentMainBannerView: View {
AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!)) AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!))
case .CREATOR: case .CREATOR:
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!)) AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!))
case .SERIES:
AppState.shared.setAppStep(step: .seriesDetail(seriesId: item.seriesId!))
case .LINK: case .LINK:
if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) { if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url) UIApplication.shared.open(url)

View File

@ -64,9 +64,10 @@ struct GetAudioContentBannerResponse: Decodable {
let thumbnailImageUrl: String let thumbnailImageUrl: String
let eventItem: EventItem? let eventItem: EventItem?
let creatorId: Int? let creatorId: Int?
let seriesId: Int?
let link: String? let link: String?
} }
enum AudioContentBannerType: String, Decodable { enum AudioContentBannerType: String, Decodable {
case EVENT, CREATOR, LINK case EVENT, CREATOR, LINK, SERIES
} }