diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-23 17:44:31 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-23 17:44:31 +0100 |
commit | c04672bf211bb7fdf89e9368d45c19194e29c3e7 (patch) | |
tree | 19ee5a92a0129bf4d2135f3d17577e4869b690c1 /sw-ui-kt/src | |
parent | Add player info (diff) | |
download | seven-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.kt | 2 | ||||
-rw-r--r-- | sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt | 3 |
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() } |