diff --git a/src/main/kotlin/main/Main.kt b/src/main/kotlin/main/Main.kt index 57b29ba..db34a46 100644 --- a/src/main/kotlin/main/Main.kt +++ b/src/main/kotlin/main/Main.kt @@ -16,7 +16,6 @@ import java.awt.FileDialog import java.awt.Frame import androidx.compose.material.Button import androidx.compose.material.MaterialTheme -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.window.* @@ -28,9 +27,8 @@ import kotlinx.serialization.encodeToString val customRedColor = Color(0xFFB70D1B) -@OptIn(ExperimentalComposeUiApi::class) @Composable -fun HomePage( +fun homePage( onGlossaireClick: () -> Unit, onCodeAVerifierClick: () -> Unit ) { @@ -80,13 +78,13 @@ fun HomePage( @Composable @Preview -fun App() { +fun app() { MaterialTheme { val currentPage = remember { mutableStateOf("accueil") } when (currentPage.value) { "accueil" -> { - HomePage( + homePage( onGlossaireClick = { currentPage.value = "glossaire" }, onCodeAVerifierClick = { currentPage.value = "choixLangage" } ) @@ -133,10 +131,10 @@ fun App() { ) } "formulaire" -> { - FormulairePage(onAnnulerClick = { currentPage.value = "glossaire" }) + formulairePage(onAnnulerClick = { currentPage.value = "glossaire" }) } "choixLangage" -> { - ChoixLangagePage( + choixLangagePage( onRetourClick = { currentPage.value = "accueil" }, onPythonClick = { val fileDialog = FileDialog(Frame(), "Select a file", FileDialog.LOAD) @@ -284,7 +282,7 @@ fun verifierChampsRequis(mot: Map): Boolean { } @Composable -fun ChoixLangagePage( +fun choixLangagePage( onRetourClick: () -> Unit, onPythonClick: () -> Unit, onJavaClick: () -> Unit, @@ -429,7 +427,7 @@ fun glossairePage( @Composable -fun FormulairePage(onAnnulerClick: () -> Unit) { +fun formulairePage(onAnnulerClick: () -> Unit) { MaterialTheme { Column( @@ -609,6 +607,6 @@ fun main() = application { icon = painterResource("assets/logo/logo.png"), onCloseRequest = ::exitApplication ) { - App() + app() } }