import { h, Component } from 'preact'; import PropTypes from 'prop-types'; import Article from './article'; import ChannelRequest from './channelRequest'; import RequestManager from './requestManager'; export default class Content extends Component { static propTypes = { resource: PropTypes.object, activeChannelId: PropTypes.number, pusherKey: PropTypes.string, fullscreen: PropTypes.bool, }; render() { const { onTriggerContent, fullscreen } = this.props; if (!this.props.resource) { return ''; } const smartSvgIcon = (content, d) => ( ); return (
{display(this.props)}
); } } function display(props) { const { resource } = props; if (resource.type_of === 'loading-user') { return
; } if (resource.type_of === 'article') { return
; } if (resource.type_of === 'channel-request') { return ( ); } if (resource.type_of === 'channel-request-manager') { return ( ); } }