Skip to content

Commit

Permalink
[feature/#1011] 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Jan 16, 2025
1 parent d27aeee commit da2acab
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ private fun AuthBottom(
}

@Composable
private fun AuthDivider() {
private fun AuthDivider(
modifier: Modifier = Modifier
) {
Row(
modifier = Modifier.padding(horizontal = 20.dp),
modifier = modifier.padding(horizontal = 20.dp),
verticalAlignment = Alignment.CenterVertically,
) {
HorizontalDivider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class AuthMainViewModel @Inject constructor(
authPlatform = GOOGLE
)
).onSuccess {
//todo: 홈 화면으로 이동
_sideEffect.emit(AuthMainSideEffect.ShowToast("성공!!"))
//TODO: 홈 화면으로 이동
_sideEffect.emit(AuthMainSideEffect.ShowToast("성공"))
}.onFailure {
_sideEffect.emit(AuthMainSideEffect.ShowToast("실패ㅠㅠ!!"))
_sideEffect.emit(AuthMainSideEffect.ShowToast("실패"))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class CertificationViewModel @Inject constructor(
private val repository: AuthRepository
) : ViewModel() {

private val _state: MutableStateFlow<CertificationState> = MutableStateFlow(CertificationState())
private val _state: MutableStateFlow<CertificationState> =
MutableStateFlow(CertificationState())
val state: StateFlow<CertificationState> = _state.asStateFlow()

private val _sideEffect = MutableSharedFlow<CertificationSideEffect>()
Expand Down Expand Up @@ -75,16 +76,11 @@ class CertificationViewModel @Inject constructor(
resetErrorCase()
updateButtonText()
}.onFailure {
// TODO: DELETE startTimer(), resetErrorCase(), updateButtonText() !!
startTimer()
resetErrorCase()
updateButtonText()
// TODO: 주석 해제
// _state.update { currentState ->
// currentState.copy(
// errorMessage = ErrorCase.PHONE_ERROR.message
// )
// }
_state.update { currentState ->
currentState.copy(
errorMessage = ErrorCase.PHONE_ERROR.message
)
}
}
}
}
Expand All @@ -105,7 +101,7 @@ class CertificationViewModel @Inject constructor(
_sideEffect.emit(CertificationSideEffect.NavigateToSocialAccount(response.name))
}
}.onFailure {
_sideEffect.emit(CertificationSideEffect.ShowToast("실패ㅠㅠ"))
_sideEffect.emit(CertificationSideEffect.ShowToast("실패"))
}
}
}
Expand All @@ -119,7 +115,7 @@ class CertificationViewModel @Inject constructor(
).onSuccess { response ->
_sideEffect.emit(CertificationSideEffect.NavigateToAuthMain(response.platform))
}.onFailure {
_sideEffect.emit(CertificationSideEffect.ShowToast("실패ㅠㅠ"))
_sideEffect.emit(CertificationSideEffect.ShowToast("실패"))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class SocialAccountViewModel @Inject constructor(
authPlatform = GOOGLE
)
).onSuccess {
_sideEffect.emit(SocialAccountSideEffect.ShowToast("성공!!"))
_sideEffect.emit(SocialAccountSideEffect.ShowToast("성공"))
}.onFailure {
_sideEffect.emit(SocialAccountSideEffect.ShowToast("실패ㅠㅠ"))
_sideEffect.emit(SocialAccountSideEffect.ShowToast("실패"))
}
}
}
Expand All @@ -57,9 +57,9 @@ class SocialAccountViewModel @Inject constructor(
token = "codecodecodecodecode"
)
).onSuccess {
_sideEffect.emit(SocialAccountSideEffect.ShowToast("성공!!"))
_sideEffect.emit(SocialAccountSideEffect.ShowToast("성공"))
}.onFailure {
_sideEffect.emit(SocialAccountSideEffect.ShowToast("실패ㅠㅠ"))
_sideEffect.emit(SocialAccountSideEffect.ShowToast("실패"))
}
}
}
Expand Down

0 comments on commit da2acab

Please sign in to comment.