From c04672bf211bb7fdf89e9368d45c19194e29c3e7 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Mon, 23 Mar 2020 17:44:31 +0100 Subject: Insignificant cleanup --- .../main/kotlin/org/luxons/sevenwonders/ui/components/lobby/Lobby.kt | 2 +- sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'sw-ui-kt/src/main/kotlin/org/luxons') 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(props) fun RBuilder.lobby() = lobby {} -val lobby = connect( +private val lobby = connect( 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() } -- cgit