feat: Display Quiz ID in QuizScreen and integrate with navigation

This commit updates the `QuizScreen` to display the ID of the fetched quiz and connects the `QuizScreen` composable to the navigation graph.

Key changes:

- **UI Layer (`ui:quiz` module):**
    - In `QuizScreen.kt`:
        - Modified the `QuizScreen` composable to display the `quiz.id.value` from the `QuizUiState` within a `Column` and `Text` element.
    - In `navigation/QuizNavigation.kt`:
        - Updated the `quizScreen` navigation extension to call the `QuizScreen()` composable.
This commit is contained in:
GitHub Actions Bot
2025-09-03 13:15:45 +02:00
parent 1270ad93d9
commit 57313de1d7
2 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
package dev.adriankuta.kahootquiz.ui.quiz
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
@@ -25,5 +27,7 @@ private fun QuizScreen(
uiState: QuizUiState,
modifier: Modifier = Modifier,
) {
Column(modifier) {
Text(uiState.quiz?.id?.value ?: "")
}
}

View File

@@ -2,6 +2,7 @@ package dev.adriankuta.kahootquiz.ui.quiz.navigation
import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.composable
import dev.adriankuta.kahootquiz.ui.quiz.QuizScreen
import kotlinx.serialization.Serializable
@Serializable
@@ -9,6 +10,6 @@ data object QuizRoute
fun NavGraphBuilder.quizScreen() {
composable<QuizRoute> {
QuizScreen()
}
}