list-empty.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React from 'react';
  2. export default class extends React.Component {
  3. render () {
  4. if (this.props.list.type === 'all') {
  5. if (this.props.emptyMessage) {
  6. /* jshint ignore:start */
  7. return (
  8. <li className="list-group-item empty-message">
  9. <p className="lead">
  10. {this.props.emptyMessage}
  11. </p>
  12. <p>
  13. {gettext("Why not start one yourself?")}
  14. </p>
  15. </li>
  16. );
  17. /* jshint ignore:end */
  18. } else {
  19. /* jshint ignore:start */
  20. return (
  21. <li className="list-group-item empty-message">
  22. <p className="lead">
  23. {this.props.category.special_role
  24. ? gettext("There are no threads on this forum... yet!")
  25. : gettext("There are no threads in this category.")}
  26. </p>
  27. <p>
  28. {gettext("Why not start one yourself?")}
  29. </p>
  30. </li>
  31. );
  32. /* jshint ignore:end */
  33. }
  34. } else {
  35. /* jshint ignore:start */
  36. return <li className="list-group-item empty-message">
  37. {gettext("No threads matching specified criteria were found.")}
  38. </li>;
  39. /* jshint ignore:end */
  40. }
  41. }
  42. }