Skip to content

Commit

Permalink
[Chore] #32 - SignUpViewModel output에 삼항 연산자 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
lsj8706 committed Dec 8, 2022
1 parent 97d1b79 commit 92ed5dc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ extension SignUpViewModel {
useCase.isNicknameValid.sink { event in
print("SignUpViewModel - completion: \(event)")
} receiveValue: { isNicknameValid in
isNicknameValid ? output.nicknameAlert.send(.valid(text: I18N.SignUp.validNickname)) : output.nicknameAlert.send(.invalid(text: I18N.SignUp.duplicatedNickname))
output.nicknameAlert.send(isNicknameValid ?
.valid(text: I18N.SignUp.validNickname) : .invalid(text: I18N.SignUp.duplicatedNickname))
}.store(in: cancelBag)

useCase.isEmailFormValid.sink { event in
print("SignUpViewModel - completion: \(event)")
} receiveValue: { isEmailValid in
isEmailValid ? output.emailAlert.send(.valid(text: I18N.SignUp.validEmail)) : output.emailAlert.send(.invalid(text: I18N.SignUp.invalidEmailForm))
output.emailAlert.send(isEmailValid ?
.valid(text: I18N.SignUp.validEmail) : .invalid(text: I18N.SignUp.invalidEmailForm))
}.store(in: cancelBag)

useCase.isPasswordFormValid.combineLatest(useCase.isAccordPassword).sink { event in
Expand Down

0 comments on commit 92ed5dc

Please sign in to comment.