콘텐츠 메인, 라이브 메인, 오디션 메인, 마이페이지

- 로그인 하지 않고 페이지 조회가 되도록 수정
This commit is contained in:
Yu Sung
2025-03-24 18:32:27 +09:00
parent fa94c5447f
commit 80cb19a1c7
32 changed files with 874 additions and 595 deletions

View File

@@ -13,6 +13,7 @@ struct SectionRecommendLiveView: View {
let items: [GetRecommendLiveResponse]
@State private var currentIndex = 0
@State private var timer = Timer.publish(every: 3, on: .main, in: .common).autoconnect()
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
var body: some View {
VStack(spacing: 0) {
@@ -27,10 +28,12 @@ struct SectionRecommendLiveView: View {
Spacer()
Image("ic_message")
.onTapGesture {
AppState.shared.setAppStep(step: .message)
}
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
Image("ic_message")
.onTapGesture {
AppState.shared.setAppStep(step: .message)
}
}
}
.frame(width: screenSize().width - 26.7, alignment: .leading)
@@ -53,7 +56,11 @@ struct SectionRecommendLiveView: View {
height: (screenSize().width - 26.7) * 0.53
)
.onTapGesture {
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId))
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId))
} else {
AppState.shared.setAppStep(step: .login)
}
}
.cornerRadius(4.7)
} else {
@@ -72,7 +79,11 @@ struct SectionRecommendLiveView: View {
height: (screenSize().width - 26.7) * 0.53
)
.onTapGesture {
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId))
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId))
} else {
AppState.shared.setAppStep(step: .login)
}
}
.cornerRadius(4.7)
}