display room name

master
f0x 6 years ago
parent 0ab5383114
commit e270c0febe

@ -88,7 +88,7 @@ let App = create({
<>
<Sidebar client={this.state.client} rooms={this.state.rooms} selectRoom={(roomId) => {this.setState({roomId: roomId})}}/>
<div className="main">
<Info />
<Info room={this.state.rooms[this.state.roomId]} />
<Chat client={this.state.client} roomId={this.state.roomId}/>
<Input client={this.state.client} roomId={this.state.roomId}/>
</div>

@ -7,7 +7,11 @@ const Promise = require('bluebird')
let info = create({
displayName: "Info",
render: function() {
return <div className="info">Room Title</div>
let title = ""
if (this.props.room != undefined) {
title = this.props.room.name
}
return <div className="info">{title}</div>
}
})

Loading…
Cancel
Save