Skip to content

Commit

Permalink
[chore] 메인화며 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jiwon2724 committed Aug 24, 2024
1 parent c8db630 commit 06cfdda
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/src/main/java/pokitmons/pokit/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,22 @@ class MainActivity : ComponentActivity() {
showSplash = false
}

val navHostController = rememberNavController()
val navBackStackEntry by navHostController.currentBackStackEntryAsState()
val currentDestination by remember(navBackStackEntry) { derivedStateOf { navBackStackEntry?.destination } }

PokitTheme {
if (showSplash) {
SplashScreen()
} else {
LoginNavHost()
RootNavHost(navHostController = navHostController)
}

val navHostController = rememberNavController()
val navBackStackEntry by navHostController.currentBackStackEntryAsState()
val currentDestination by remember(navBackStackEntry) { derivedStateOf { navBackStackEntry?.destination } }

LaunchedEffect(currentDestination) {
currentDestination?.route?.let { route ->
// 믹스패널/파베 애널리틱스 화면 이동 로깅용
}
}
RootNavHost(navHostController = navHostController)
}
}
}
Expand Down

0 comments on commit 06cfdda

Please sign in to comment.