summaryrefslogtreecommitdiff
path: root/sw-ui-kt/src
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-03-23 17:44:31 +0100
committerJoffrey Bion <joffrey.bion@booking.com>2020-03-23 17:44:31 +0100
commitc04672bf211bb7fdf89e9368d45c19194e29c3e7 (patch)
tree19ee5a92a0129bf4d2135f3d17577e4869b690c1 /sw-ui-kt/src
parentAdd player info (diff)
downloadseven-wonders-c04672bf211bb7fdf89e9368d45c19194e29c3e7.tar.gz
seven-wonders-c04672bf211bb7fdf89e9368d45c19194e29c3e7.tar.bz2
seven-wonders-c04672bf211bb7fdf89e9368d45c19194e29c3e7.zip
Insignificant cleanup
Diffstat (limited to 'sw-ui-kt/src')
-rw-r--r--sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/Lobby.kt2
-rw-r--r--sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt3
2 files changed, 4 insertions, 1 deletions
diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/Lobby.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/Lobby.kt
index 8773277f..dab3c87f 100644
--- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/Lobby.kt
+++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/Lobby.kt
@@ -51,7 +51,7 @@ class LobbyPresenter(props: LobbyProps) : RComponent<LobbyProps, RState>(props)
fun RBuilder.lobby() = lobby {}
-val lobby = connect<LobbyStateProps, LobbyDispatchProps, LobbyProps>(
+private val lobby = connect<LobbyStateProps, LobbyDispatchProps, LobbyProps>(
clazz = LobbyPresenter::class,
mapStateToProps = { state, _ ->
currentGame = state.lobby
diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt
index ba0fbddf..6aa7a438 100644
--- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt
+++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt
@@ -6,6 +6,9 @@ import react.RBuilder
import react.ReactElement
import react.dom.*
+/**
+ * Creates a ReactElement without appending it (so that is can be passed around).
+ */
fun createElement(block: RBuilder.() -> ReactElement): ReactElement {
return RDOMBuilder { SPAN(attributesMapOf("class", null), it) }
.apply { block() }
bgstack15