spee.ch/react/components/ShowChannel/view.jsx

40 lines
1.3 KiB
React
Raw Normal View History

import React from 'react';
import ErrorPage from 'components/ErrorPage';
import NavBar from 'containers/NavBar';
2018-02-03 03:16:18 +01:00
import ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';
class ShowChannel extends React.Component {
// 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?
// }
// }
render () {
const { channel } = this.props;
2018-02-09 01:42:13 +01:00
if (channel) {
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">
<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">
<ChannelClaimsDisplay />
2018-02-09 01:42:13 +01:00
</div>
</div>
</div>
2018-02-09 01:42:13 +01:00
);
};
return (
<ErrorPage error={'loading channel data...'}/>
);
}
};
export default ShowChannel;