diff --git a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpAuthenticationScreen.kt b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpAuthenticationScreen.kt index e19575e5..66b315c1 100644 --- a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpAuthenticationScreen.kt +++ b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpAuthenticationScreen.kt @@ -60,21 +60,7 @@ fun SignUpAuthenticationScreen( if (bottomSheetState.bottomSheetState.isVisible) { bottomSheetState.hideBottomSheet() } else { - bottomSheetState.showBottomSheet { - ReturnToLoginBottomSheet( - onConfirm = { - bottomSheetState.hideBottomSheet() - appState.navigate(AuthDestinations.Login.ROUTE) { - popUpTo(AuthDestinations.Login.ROUTE) { - inclusive = true - } - } - }, - onCancel = { - bottomSheetState.hideBottomSheet() - } - ) - } + viewModel.processEvent(SignUpContract.Event.BackToLogin) } } diff --git a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpFavoriteTasteScreen.kt b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpFavoriteTasteScreen.kt index 32043794..c9952106 100644 --- a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpFavoriteTasteScreen.kt +++ b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpFavoriteTasteScreen.kt @@ -52,7 +52,11 @@ fun SignUpFavoriteTasteScreen( if (bottomSheetState.bottomSheetState.isVisible) { bottomSheetState.hideBottomSheet() } else { - appState.navController.navigateUp() + if (pagerState.currentPage == 0) { + viewModel.processEvent(SignUpContract.Event.CancelTasteSelection) + } else { + scope.launch { pagerState.animateScrollToPage(pagerState.currentPage - 1) } + } } } @@ -90,8 +94,6 @@ fun SignUpFavoriteTasteScreen( else -> {} } } - - else -> {} } } }