Skip to content

Commit

Permalink
Print some debug values
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanOltmann committed Oct 22, 2024
1 parent 3720ebc commit 0e3f178
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/src/wasmJsMain/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.text.intl.Locale
import androidx.compose.ui.window.CanvasBasedWindow
import kotlinx.browser.document
import kotlinx.browser.window
Expand All @@ -30,9 +31,11 @@ fun main() {

CanvasBasedWindow(canvasElementId = "ComposeTarget") {

val domain = document.domain

println("Running on domain: $domain")
/* Some debug values */
println("Running on domain: ${document.domain}")
println("Users language: " + Locale.current.language)
println("Users language tag: " + Locale.current.toLanguageTag())
println("Users region: " + Locale.current.region)

val urlHash = remember {
mutableStateOf(document.location?.hash?.drop(1)?.ifBlank { null })
Expand Down

0 comments on commit 0e3f178

Please sign in to comment.