diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt index a8c98de6..942a7295 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt @@ -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 }, diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt index c38ca1ae..6a85625c 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt @@ -36,8 +36,8 @@ class SignUpViewModel @Inject constructor( private val _signUpSemester: MutableStateFlow = MutableStateFlow(FIRST_SEMESTER) val signUpSemester: StateFlow = _signUpSemester.asStateFlow() - private val _wapMemberCode: MutableStateFlow = MutableStateFlow("") - val wapMemberCode: StateFlow = _wapMemberCode.asStateFlow() + private val _memberCode: MutableStateFlow = MutableStateFlow("") + val memberCode: StateFlow = _memberCode.asStateFlow() private val _isError: MutableStateFlow = MutableStateFlow(false) val isError: StateFlow get() = _isError @@ -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) @@ -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()