parent
a7b3c9d5e7
commit
79ab62fc31
|
@ -91,6 +91,13 @@ struct SignOutView: View {
|
||||||
.padding(.top, 20)
|
.padding(.top, 20)
|
||||||
.padding(.horizontal, 26.7)
|
.padding(.horizontal, 26.7)
|
||||||
|
|
||||||
|
Text("※ 소셜 로그인 이용자는 비밀번호를 입력하지 말고 '탈퇴하기'를 클릭하면 자동 탈퇴됩니다.")
|
||||||
|
.font(.custom(Font.medium.rawValue, size: 12))
|
||||||
|
.foregroundColor(.grayee)
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
.padding(.horizontal, 26.7)
|
||||||
|
.padding(.top, 8)
|
||||||
|
|
||||||
Text("탈퇴하기")
|
Text("탈퇴하기")
|
||||||
.font(.custom(Font.bold.rawValue, size: 15))
|
.font(.custom(Font.bold.rawValue, size: 15))
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
|
|
|
@ -38,7 +38,7 @@ final class SignOutViewModel: ObservableObject {
|
||||||
if validate() {
|
if validate() {
|
||||||
isLoading = true
|
isLoading = true
|
||||||
let reason = reasonSelectedIndex == reasons.count - 1 ? self.reason : reasons[reasonSelectedIndex]
|
let reason = reasonSelectedIndex == reasons.count - 1 ? self.reason : reasons[reasonSelectedIndex]
|
||||||
repository.signOut(reason: reason, password: password)
|
repository.signOut(reason: reason, password: password.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||||
.sink { result in
|
.sink { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .finished:
|
case .finished:
|
||||||
|
@ -83,12 +83,6 @@ final class SignOutViewModel: ObservableObject {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if password.isEmpty {
|
|
||||||
errorMessage = "비밀번호를 입력해 주세요."
|
|
||||||
isShowPopup = true
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue