Skip to content

Commit

Permalink
[FIX] 내 정보 API 호출 시점 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhooon committed Mar 30, 2024
1 parent 8bca636 commit 0f88332
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ internal fun MyPageScreen(
onNavigateToLogin: () -> Unit,
clearAuthToken: () -> Unit,
) {
LaunchedEffect(key1 = Unit) {
getUserInfo()
}

Column(
modifier = Modifier
.fillMaxSize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import org.orbitmvi.orbit.syntax.simple.intent
import org.orbitmvi.orbit.syntax.simple.postSideEffect
import org.orbitmvi.orbit.syntax.simple.reduce
import org.orbitmvi.orbit.viewmodel.container
import timber.log.Timber
import javax.inject.Inject

@HiltViewModel
Expand All @@ -30,11 +29,6 @@ class MyPageViewModel @Inject constructor(
) : ViewModel(), ContainerHost<MyPageState, MyPageSideEffect>, ErrorHandlerActions {
override val container = container<MyPageState, MyPageSideEffect>(MyPageState())

init {
Timber.d("MyPageViewModel is initialized")
getUserInfo()
}

fun getUserInfo() = intent {
viewModelScope.launch {
reduce {
Expand Down

0 comments on commit 0f88332

Please sign in to comment.