import React from 'react'; import PageLead from 'misago/components/page-lead'; // jshint ignore:line import Toolbar from 'misago/components/threads/toolbar'; // jshint ignore:line export default class extends React.Component { getCategoryDescription() { if (this.props.pageLead) { /* jshint ignore:start */ return (

{this.props.pageLead}

); /* jshint ignore:end */ } else if (this.props.route.category.description) { /* jshint ignore:start */ return (
); /* jshint ignore:end */ } else { return null; } } getDisableToolbar() { return !this.props.isLoaded || this.props.isBusy || this.props.busyThreads.length; } getToolbar() { const isVisible = this.props.subcategories.length || this.props.user.id; if (!isVisible) return null; /* jshint ignore:start */ return ( ); /* jshint ignore:end */ } render() { /* jshint ignore:start */ return (
{this.getCategoryDescription()} {this.getToolbar()} {this.props.children}
); /* jshint ignore:end */ } }