2018-01-30 18:00:02 +01:00
import React from 'react' ;
2018-02-07 20:30:39 +01:00
import ErrorPage from 'components/ErrorPage' ;
2018-01-30 18:00:02 +01:00
import NavBar from 'containers/NavBar' ;
2018-02-03 03:16:18 +01:00
import ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay' ;
2018-01-30 18:00:02 +01:00
class ShowChannel extends React . Component {
2018-02-14 20:39:24 +01:00
// componentDidMount () {
// const { channel, requestId, requestChannelName, requestChannelId } = this.props;
// if (!channel) {
// return this.props.onNewChannelRequest(requestId, requestChannelName, requestChannelId); // check the channel you have in the request and see you have no channel so fetch that channel?
// }
// }
2018-01-30 18:00:02 +01:00
render ( ) {
2018-02-13 03:18:56 +01:00
const { channel } = this . props ;
2018-02-09 01:42:13 +01:00
if ( channel ) {
2018-02-13 03:18:56 +01:00
const { name , longId , shortId } = channel ;
2018-02-09 01:42:13 +01:00
return (
< div >
< NavBar / >
< div className = "row row--tall row--padded" >
< div className = "column column--10" >
2018-02-14 18:19:22 +01:00
< h2 > channel name : { name || 'loading...' } < / h2 >
< p className = { 'fine-print' } > full channel id : { longId || 'loading...' } < / p >
< p className = { 'fine-print' } > short channel id : { shortId || 'loading...' } < / p >
2018-02-09 01:42:13 +01:00
< / div >
< div className = "column column--10" >
2018-02-13 03:18:56 +01:00
< ChannelClaimsDisplay / >
2018-02-09 01:42:13 +01:00
< / div >
2018-01-30 18:00:02 +01:00
< / div >
2018-02-07 20:30:39 +01:00
< / div >
2018-02-09 01:42:13 +01:00
) ;
} ;
return (
< ErrorPage error = { 'loading channel data...' } / >
2018-01-30 18:00:02 +01:00
) ;
}
} ;
export default ShowChannel ;