Skip to content

Commit

Permalink
[CHORE/#5] NavigateToHome 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Jul 6, 2024
1 parent 1110416 commit 2dc3f98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.extension.toast
import com.terning.feature.R
import com.terning.feature.home.navigation.navigateHome
import com.terning.feature.mypage.navigation.navigateMyPage
import com.terning.feature.onboarding.signin.component.KakaoButton

@Composable
Expand All @@ -41,7 +40,7 @@ fun SignInRoute(
.collect { sideEffect ->
when (sideEffect) {
is SignInSideEffect.ShowToast -> context.toast(sideEffect.message)
is SignInSideEffect.NavigateToMain -> navController.navigateHome()
is SignInSideEffect.NavigateToHome -> navController.navigateHome()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package com.terning.feature.onboarding.signin
import androidx.annotation.StringRes

sealed class SignInSideEffect {
data object NavigateToMain : SignInSideEffect()
data object NavigateToHome : SignInSideEffect()
data class ShowToast(@StringRes val message: Int) : SignInSideEffect()
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class SignInViewModel @Inject constructor() : ViewModel() {
viewModelScope.launch {
_signInState.value =
_signInState.value.copy(accessToken = UiState.Success(token.accessToken))
_signInSideEffects.emit(SignInSideEffect.NavigateToMain)
_signInSideEffects.emit(SignInSideEffect.NavigateToHome)
}
}

Expand Down

0 comments on commit 2dc3f98

Please sign in to comment.