Skip to content

Commit

Permalink
[CHORE] : onSignInSucceed 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Mar 29, 2024
1 parent ea71a76 commit ab45c86
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,19 @@ internal fun SignInRoute(
) {
SignInScreen(
signInUseCase = signInUseCase,
logUserSignedIn = viewModel::logUserSignedIn,
navigateToSignUp = navigateToSignUp,
navigateToNotice = navigateToNotice,
onSignInSucceed = {
viewModel.logUserSignedIn()
navigateToNotice()
},
)
}

@OptIn(ExperimentalMaterial3Api::class, ExperimentalComposeUiApi::class)
@Composable
internal fun SignInScreen(
signInUseCase: SignInUseCase,
logUserSignedIn: () -> Unit,
navigateToNotice: () -> Unit,
onSignInSucceed: () -> Unit,
navigateToSignUp: () -> Unit,
) {
val coroutineScope = rememberCoroutineScope()
Expand Down Expand Up @@ -126,9 +127,8 @@ internal fun SignInScreen(
email = email,
coroutineScope = coroutineScope,
signInUseCase = signInUseCase,
logUserSignedIn = logUserSignedIn,
navigateToSignUp = navigateToSignUp,
navigateToNotice = navigateToNotice,
onSignInSucceed = onSignInSucceed,
snackBarHostState = snackBarHostState,
)

Expand Down Expand Up @@ -200,8 +200,7 @@ private fun SignInButton(
email: String,
coroutineScope: CoroutineScope,
signInUseCase: SignInUseCase,
logUserSignedIn: () -> Unit,
navigateToNotice: () -> Unit,
onSignInSucceed: () -> Unit,
navigateToSignUp: () -> Unit,
snackBarHostState: SnackbarHostState,
) {
Expand All @@ -212,8 +211,7 @@ private fun SignInButton(
.onSuccess {
when (it) {
AuthState.SIGN_IN -> {
logUserSignedIn()
navigateToNotice()
onSignInSucceed()
}

AuthState.SIGN_UP -> {
Expand Down

0 comments on commit ab45c86

Please sign in to comment.