diff --git a/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt b/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt index 6475249..cfe264b 100644 --- a/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt +++ b/torisetsu/src/jsMain/kotlin/core/ComposeQuiz.kt @@ -266,23 +266,27 @@ class ComposeQuiz : Quiz { ), ) private val results: List = listOf( - "/torisetsu/aoitori.html", - "/torisetsu/swift_2.html", - "/torisetsu/swift_1.html", - "/torisetsu/penguin.html", - "/torisetsu/kakapo.html", - "/torisetsu/kanaria.html", - "/torisetsu/kiwi.html", - "/torisetsu/hayabusa.html", - "/torisetsu/hashibirokou.html", - "/torisetsu/hashibirokou_sr.html", + "/aoitori.html", + "/swift_2.html", + "/swift_1.html", + "/penguin.html", + "/kakapo.html", + "/kanaria.html", + "/kiwi.html", + "/hayabusa.html", + "/hashibirokou.html", + "/hashibirokou_sr.html", ) override val currentQuizId: MutableState = mutableStateOf(0) override val currentQuizNumber: MutableState = mutableStateOf(1) override fun onClickNext(answerOption: AnswerOption) { if (answerOption.isFinish) { - window.location.href = results[answerOption.nextId] + if (window.location.href.contains("torisetsu")) { + window.location.href = "/torisetsu" + results[answerOption.nextId] + } else { + window.location.href = results[answerOption.nextId] + } } currentQuizNumber.value += 1 currentQuizId.value = answerOption.nextId