Skip to content

Commit

Permalink
feature #866: fix navigation error
Browse files Browse the repository at this point in the history
  • Loading branch information
chattymin authored and l2hyunwoo committed Sep 24, 2024
1 parent 226347f commit 162245b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
Expand All @@ -51,7 +51,7 @@ import org.sopt.official.feature.fortune.feature.home.HomeRoute

@Composable
fun MainScreen(
navController: NavController = rememberNavController(),
navController: NavHostController = rememberNavController(),
) {
Scaffold(
modifier = Modifier.fillMaxSize(),
Expand All @@ -77,7 +77,7 @@ fun MainScreen(
.padding(paddingValue)
) {
NavHost(
navController = rememberNavController(),
navController = navController,
startDestination = Home
) {
composable<Home> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ package org.sopt.official.feature.fortune.feature.fortundDetail
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import kotlinx.serialization.Serializable
import org.sopt.official.designsystem.SoptTheme

@Serializable
data class FortuneDetail(val date: String)
Expand All @@ -44,5 +45,8 @@ fun FortuneDetailRoute(
fun FortuneDetailScreen(
date: String,
) {
Text(text = "Fortune Detail Screen: $date")
Text(
text = "Fortune Detail Screen: $date",
color = SoptTheme.colors.onBackground
)
}

0 comments on commit 162245b

Please sign in to comment.