docbrown/app/javascript/chat/view.jsx
Ben Halpern e2dbd7cfcc
Remove beta label on /connect and other small changes (#589)
* Remove beta label on /connect and other small changes

* Add better placeholder for narrow screens

* Adjust comma/bracket placement

* Add description to chat channels
2018-07-16 14:48:38 -04:00

29 lines
No EOL
1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { h, Component } from 'preact';
export default class View extends Component {
render() {
const channels = this.props.channels.map((channel) => {
return <div className='chatNonChatView_contentblock'>
<h2>{channel.channel_name}</h2>
<div><em>{channel.description}</em></div>
<button className='cta' onClick={this.props.onAcceptInvitation} data-content={channel.membership_id}>Accept</button>
<button className='cta' onClick={this.props.onDeclineInvitation} data-content={channel.membership_id}>Decline</button>
</div>
});
return <div className="chatNonChatView">
<div className="container">
<button
class="chatNonChatView_exitbutton"
data-content="exit"
onClick={this.props.onViewExit}
>×</button>
<h1>Channel Invitations 🤗</h1>
{channels}
</div>
</div>
}
}