라이브 메인 - 이벤트 클릭 이벤트 추가

This commit is contained in:
Yu Sung 2023-08-21 01:29:01 +09:00
parent 38df12872a
commit d93c3e8836
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ struct SectionEventBannerView: View {
.tag(index)
.onTapGesture {
if let _ = item.detailImageUrl {
AppState.shared.setAppStep(step: .eventDetail(event: item))
} else if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url)
}
@ -39,6 +40,7 @@ struct SectionEventBannerView: View {
.tag(index)
.onTapGesture {
if let _ = item.detailImageUrl {
AppState.shared.setAppStep(step: .eventDetail(event: item))
} else if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url)
}