From 39f84ceadfe544129d47f5c6d53cdb0516159c37 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Mon, 20 Nov 2023 19:51:16 +0900 Subject: [PATCH] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=ED=8E=98=EC=9D=B4=EC=A7=80=20-=20sns,=20=EC=86=8C?= =?UTF-8?q?=EA=B0=9C,=20=ED=83=9C=EA=B7=B8=20=EC=88=98=EC=A0=95=20UI=20?= =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4=ED=84=B0=EB=A7=8C=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyPage/Profile/ProfileUpdateView.swift | 84 +++++++++++++------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/SodaLive/Sources/MyPage/Profile/ProfileUpdateView.swift b/SodaLive/Sources/MyPage/Profile/ProfileUpdateView.swift index 5fced00..52066be 100644 --- a/SodaLive/Sources/MyPage/Profile/ProfileUpdateView.swift +++ b/SodaLive/Sources/MyPage/Profile/ProfileUpdateView.swift @@ -323,40 +323,74 @@ struct ProfileUpdateView: View { NicknameAndGenderView() .padding(.top, 13.3) - InstagramAndYoutubeAccountView() - .padding(.top, 13.3) + if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue { + InstagramAndYoutubeAccountView() + .padding(.top, 13.3) + } - TagSelectView() - .padding(.top, 33.3) + if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue { + TagSelectView() + .padding(.top, 33.3) + } - ContentInputView() - .padding(.top, 33.3) + if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue { + ContentInputView() + .padding(.top, 33.3) + } - Text("저장하기") - .font(.custom(Font.bold.rawValue, size: 18.3)) - .foregroundColor(Color.white) - .frame(width: screenSize().width - 26.7, height: 50) - .background(Color(hex: "9970ff")) - .cornerRadius(10) - .padding(.vertical, 13.7) - .padding(.horizontal, 13.3) - .frame(width: screenSize().width) - .background(Color(hex: "222222")) - .cornerRadius(16.7, corners: [.topLeft, .topRight]) - .padding(.top, 26.7) - .onTapGesture { - viewModel.updateProfile() + if UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue { + Text("저장하기") + .font(.custom(Font.bold.rawValue, size: 18.3)) + .foregroundColor(Color.white) + .frame(width: screenSize().width - 26.7, height: 50) + .background(Color(hex: "9970ff")) + .cornerRadius(10) + .padding(.vertical, 13.7) + .padding(.horizontal, 13.3) + .frame(width: screenSize().width) + .background(Color(hex: "222222")) + .cornerRadius(16.7, corners: [.topLeft, .topRight]) + .padding(.top, 26.7) + .onTapGesture { + viewModel.updateProfile() + } + + if proxy.safeAreaInsets.bottom > 0 { + Rectangle() + .foregroundColor(Color(hex: "222222")) + .frame(width: proxy.size.width, height: 15.3) } - - if proxy.safeAreaInsets.bottom > 0 { - Rectangle() - .foregroundColor(Color(hex: "222222")) - .frame(width: proxy.size.width, height: 15.3) } } } } .padding(.top, 13.3) + + if UserDefaults.string(forKey: .role) != MemberRole.CREATOR.rawValue { + Spacer() + + Text("저장하기") + .font(.custom(Font.bold.rawValue, size: 18.3)) + .foregroundColor(Color.white) + .frame(width: screenSize().width - 26.7, height: 50) + .background(Color(hex: "9970ff")) + .cornerRadius(10) + .padding(.vertical, 13.7) + .padding(.horizontal, 13.3) + .frame(width: screenSize().width) + .background(Color(hex: "222222")) + .cornerRadius(16.7, corners: [.topLeft, .topRight]) + .padding(.top, 13.3) + .onTapGesture { + viewModel.updateProfile() + } + + if proxy.safeAreaInsets.bottom > 0 { + Rectangle() + .foregroundColor(Color(hex: "222222")) + .frame(width: proxy.size.width, height: 15.3) + } + } } if isShowPhotoPicker {