feat: 메인 홈 - 추천 채널의 크리에이터, 시리즈 아이템

- 터치시 로그인이 되어 있지 않으면 로그인 페이지로 이동
This commit is contained in:
Yu Sung
2025-07-14 20:05:52 +09:00
parent 3bc42b6e01
commit 153eff2401
2 changed files with 17 additions and 10 deletions

View File

@@ -24,15 +24,6 @@ struct SeriesItemView: View {
.frame(width: 168, height: 238, alignment: .center) .frame(width: 168, height: 238, alignment: .center)
.cornerRadius(16) .cornerRadius(16)
.clipped() .clipped()
.onTapGesture {
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
AppState.shared
.setAppStep(step: .seriesDetail(seriesId: item.seriesId))
} else {
AppState.shared
.setAppStep(step: .login)
}
}
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
if !item.isComplete && item.isNew { if !item.isComplete && item.isNew {
@@ -107,6 +98,16 @@ struct SeriesItemView: View {
.padding(.horizontal, 8) .padding(.horizontal, 8)
} }
.frame(width: 168) .frame(width: 168)
.contentShape(Rectangle())
.onTapGesture {
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
AppState.shared
.setAppStep(step: .seriesDetail(seriesId: item.seriesId))
} else {
AppState.shared
.setAppStep(step: .login)
}
}
} }
} }

View File

@@ -40,7 +40,13 @@ struct RecommendChannelItemView: View {
} }
} }
.onTapGesture { .onTapGesture {
AppState.shared.setAppStep(step: .creatorDetail(userId: item.channelId)) if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
AppState.shared
.setAppStep(step: .creatorDetail(userId: item.channelId))
} else {
AppState.shared
.setAppStep(step: .login)
}
} }
ForEach(0..<item.contentList.count, id: \.self) { ForEach(0..<item.contentList.count, id: \.self) {