diff --git a/app/src/main/java/org/sopt/and/presentation/ui/main/navigation/MainNavGraph.kt b/app/src/main/java/org/sopt/and/presentation/ui/main/navigation/MainNavGraph.kt index febcc6c..474ff8b 100644 --- a/app/src/main/java/org/sopt/and/presentation/ui/main/navigation/MainNavGraph.kt +++ b/app/src/main/java/org/sopt/and/presentation/ui/main/navigation/MainNavGraph.kt @@ -35,7 +35,9 @@ fun NavGraphBuilder.mainNavGraph( ) } composable(route = WavveRoute.SETTING) { - SettingRoute() + SettingRoute( + navigateToMyPage = { navController.navigateToMy() } + ) } } } \ No newline at end of file diff --git a/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SearchScreen.kt b/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SearchScreen.kt index 4c87d7f..09708e1 100644 --- a/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SearchScreen.kt +++ b/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SearchScreen.kt @@ -77,7 +77,7 @@ fun SearchScreen( .fillMaxWidth() .wrapContentHeight() .clip(shape = RoundedCornerShape(20.dp)) - .background(color = Color(0xFF1352F9)) + .background(color = if(isInputAvailable) Color(0xFF1352F9) else Color.Gray) .clickable( enabled = isInputAvailable, onClick = { onSearchClick(inputSearch) } diff --git a/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SettingScreen.kt b/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SettingScreen.kt index 2bd287d..3e7fe2c 100644 --- a/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SettingScreen.kt +++ b/app/src/main/java/org/sopt/and/presentation/ui/main/screen/SettingScreen.kt @@ -33,14 +33,16 @@ import org.sopt.and.ui.theme.ANDANDROIDTheme @Composable fun SettingRoute( - mainViewModel: MainViewModel = hiltViewModel() + mainViewModel: MainViewModel = hiltViewModel(), + navigateToMyPage: () -> Unit ) { val userInfoUpdateState by mainViewModel.userInfoUpdateState.collectAsState() SettingScreen( userInfoUpdateState = userInfoUpdateState, resetUserInfoUpdateState = { mainViewModel.resetUserInfoUpdateState() }, - onUserInfoChangeClick = { password, hobby -> mainViewModel.updateUserInfo(password, hobby) } + onUserInfoChangeClick = { password, hobby -> mainViewModel.updateUserInfo(password, hobby) }, + navigateToMyPage = navigateToMyPage ) } @@ -48,7 +50,8 @@ fun SettingRoute( fun SettingScreen( userInfoUpdateState: UserInfoUpdateState, resetUserInfoUpdateState: () -> Unit, - onUserInfoChangeClick: (String?, String?) -> Unit + onUserInfoChangeClick: (String?, String?) -> Unit, + navigateToMyPage: () -> Unit ) { val context = LocalContext.current var inputPassword by remember { mutableStateOf("") } @@ -118,6 +121,7 @@ fun SettingScreen( message = "회원정보 변경에 성공했습니다." ) resetUserInfoUpdateState() + navigateToMyPage() } is UserInfoUpdateState.Failure -> { @@ -140,7 +144,8 @@ fun ShowSettingScreen() { SettingScreen( userInfoUpdateState = UserInfoUpdateState.Idle, resetUserInfoUpdateState = {}, - onUserInfoChangeClick = { _, _ -> } + onUserInfoChangeClick = { _, _ -> }, + navigateToMyPage = {} ) } } \ No newline at end of file