오디션 상세

- 지원리스트에서 유저 프로필을 누르면 채널로 이동
This commit is contained in:
Yu Sung 2025-01-08 16:21:29 +09:00
parent ca7a2d4c72
commit b5b53f95c7
4 changed files with 166 additions and 152 deletions

View File

@ -36,12 +36,18 @@ struct AuditionApplicantItemView: View {
) )
} }
} }
.onTapGesture {
AppState.shared.setAppStep(step: .creatorDetail(userId: item.memberId))
}
VStack(spacing: 8) { VStack(spacing: 8) {
HStack(spacing: 0) { HStack(spacing: 0) {
Text(item.nickname.count > 9 ? "\(item.nickname.prefix(9))..." : item.nickname) Text(item.nickname.count > 9 ? "\(item.nickname.prefix(9))..." : item.nickname)
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color.white) .foregroundColor(Color.white)
.onTapGesture {
AppState.shared.setAppStep(step: .creatorDetail(userId: item.memberId))
}
Spacer() Spacer()

View File

@ -19,6 +19,7 @@ struct GetCreatorProfileResponse: Decodable {
let activitySummary: GetCreatorActivitySummary let activitySummary: GetCreatorActivitySummary
let seriesList: [SeriesListItem] let seriesList: [SeriesListItem]
let isBlock: Bool let isBlock: Bool
let isCreatorRole: Bool
} }
struct CreatorResponse: Decodable { struct CreatorResponse: Decodable {

View File

@ -11,6 +11,7 @@ import Kingfisher
struct UserProfileCreatorView: View { struct UserProfileCreatorView: View {
let creator: CreatorResponse let creator: CreatorResponse
let isCreator: Bool
let creatorFollow: () -> Void let creatorFollow: () -> Void
let showCreatorFollowNotifyDialog: () -> Void let showCreatorFollowNotifyDialog: () -> Void
@ -42,11 +43,13 @@ struct UserProfileCreatorView: View {
Spacer() Spacer()
if isCreator {
Image("btn_big_share") Image("btn_big_share")
.resizable() .resizable()
.frame(width: 33.3, height: 33.3) .frame(width: 33.3, height: 33.3)
.onTapGesture { shareChannel() } .onTapGesture { shareChannel() }
} }
}
if creator.creatorId == UserDefaults.int(forKey: .userId) { if creator.creatorId == UserDefaults.int(forKey: .userId) {
Text("팔로워 리스트") Text("팔로워 리스트")
@ -158,7 +161,8 @@ struct UserProfileCreatorView_Previews: PreviewProvider {
isNotify: false, isNotify: false,
isNotification: false, isNotification: false,
notificationRecipientCount: 2 notificationRecipientCount: 2
) ),
isCreator: false
) { ) {
} showCreatorFollowNotifyDialog: { } showCreatorFollowNotifyDialog: {
} shareChannel: { } shareChannel: {

View File

@ -52,8 +52,7 @@ struct UserProfileView: View {
VStack(spacing: 0) { VStack(spacing: 0) {
if let creatorProfile = viewModel.creatorProfile { if let creatorProfile = viewModel.creatorProfile {
VStack(spacing: 0) { VStack(spacing: 0) {
UserProfileCreatorView( UserProfileCreatorView(creator: creatorProfile.creator, isCreator: creatorProfile.isCreatorRole) {
creator: creatorProfile.creator) {
viewModel.creatorFollow() viewModel.creatorFollow()
} showCreatorFollowNotifyDialog: { } showCreatorFollowNotifyDialog: {
isShowFollowNotifyDialog = true isShowFollowNotifyDialog = true
@ -61,6 +60,7 @@ struct UserProfileView: View {
viewModel.shareChannel(userId: userId) viewModel.shareChannel(userId: userId)
} }
if creatorProfile.isCreatorRole {
UserProfileActivitySummaryView(item: creatorProfile.activitySummary) UserProfileActivitySummaryView(item: creatorProfile.activitySummary)
.padding(.top, 13.3) .padding(.top, 13.3)
.padding(.horizontal, 13.3) .padding(.horizontal, 13.3)
@ -112,7 +112,9 @@ struct UserProfileView: View {
} }
} }
} }
}
if creatorProfile.isCreatorRole {
if !creatorProfile.seriesList.isEmpty { if !creatorProfile.seriesList.isEmpty {
UserProfileSeriesView( UserProfileSeriesView(
creatorId: creatorProfile.creator.creatorId, creatorId: creatorProfile.creator.creatorId,
@ -216,6 +218,7 @@ struct UserProfileView: View {
} }
.padding(.top, 26.7) .padding(.top, 26.7)
} }
}
UserProfileFanTalkView( UserProfileFanTalkView(
userId: userId, userId: userId,