Skip to content

Commit

Permalink
[REFACTOR] #141 : wapMemberCode -> MemberCode 프로퍼티 네이밍 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Mar 3, 2024
1 parent 6a9389f commit a955f68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ internal fun SignUpScreen(
) {
if (showCodeValidationDialog) {
CodeValidationDialog(
code = viewModel.wapMemberCode.collectAsStateWithLifecycle().value,
code = viewModel.memberCode.collectAsStateWithLifecycle().value,
setValidationCode = viewModel::setWapMemberCode,
onConfirmRequest = viewModel::validateMemberCode,
onDismissRequest = { showCodeValidationDialog = false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class SignUpViewModel @Inject constructor(
private val _signUpSemester: MutableStateFlow<String> = MutableStateFlow(FIRST_SEMESTER)
val signUpSemester: StateFlow<String> = _signUpSemester.asStateFlow()

private val _wapMemberCode: MutableStateFlow<String> = MutableStateFlow("")
val wapMemberCode: StateFlow<String> = _wapMemberCode.asStateFlow()
private val _memberCode: MutableStateFlow<String> = MutableStateFlow("")
val memberCode: StateFlow<String> = _memberCode.asStateFlow()

private val _isError: MutableStateFlow<Boolean> = MutableStateFlow(false)
val isError: StateFlow<Boolean> get() = _isError
Expand All @@ -58,7 +58,7 @@ class SignUpViewModel @Inject constructor(
}

fun validateMemberCode() = viewModelScope.launch {
validateWapMemberCodeUseCase(_wapMemberCode.value).onSuccess {
validateWapMemberCodeUseCase(_memberCode.value).onSuccess {
when (it) {
CodeValidation.VALID ->
_signUpEventFlow.emit(SignUpEvent.ValidateMemberCodeSuccess)
Expand Down Expand Up @@ -95,7 +95,7 @@ class SignUpViewModel @Inject constructor(

fun setSemester(semester: String) { _signUpSemester.value = semester }

fun setWapMemberCode(code: String) { _wapMemberCode.value = code }
fun setWapMemberCode(code: String) { _memberCode.value = code }

sealed class SignUpEvent {
data object ValidateUserInformationSuccess : SignUpEvent()
Expand Down

0 comments on commit a955f68

Please sign in to comment.