This commit is contained in:
Trey t
2025-11-05 20:52:51 -06:00
parent bc289d6c88
commit a8083380aa
12 changed files with 720 additions and 78 deletions

View File

@@ -197,6 +197,9 @@ fun App() {
onAddResidence = {
navController.navigate(AddResidenceRoute)
},
onNavigateToProfile = {
navController.navigate(ProfileRoute)
},
onLogout = {
// Clear token and lookups on logout
TokenStorage.clearToken()
@@ -351,6 +354,24 @@ fun App() {
onTaskUpdated = { navController.popBackStack() }
)
}
composable<ProfileRoute> {
com.mycrib.android.ui.screens.ProfileScreen(
onNavigateBack = {
navController.popBackStack()
},
onLogout = {
// Clear token and lookups on logout
TokenStorage.clearToken()
LookupsRepository.clear()
isLoggedIn = false
isVerified = false
navController.navigate(LoginRoute) {
popUpTo<ProfileRoute> { inclusive = true }
}
}
)
}
}
}