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

34 lines
1,015 B
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 {
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;