list-empty.js 1001 B

123456789101112131415161718192021222324252627282930313233
  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. return (
  7. <li className="list-group-item empty-message">
  8. <p className="lead">{this.props.emptyMessage}</p>
  9. <p>{gettext("Why not start one yourself?")}</p>
  10. </li>
  11. )
  12. } else {
  13. return (
  14. <li className="list-group-item empty-message">
  15. <p className="lead">
  16. {this.props.category.special_role
  17. ? gettext("There are no threads on this forum... yet!")
  18. : gettext("There are no threads in this category.")}
  19. </p>
  20. <p>{gettext("Why not start one yourself?")}</p>
  21. </li>
  22. )
  23. }
  24. } else {
  25. return (
  26. <li className="list-group-item empty-message">
  27. {gettext("No threads matching specified criteria were found.")}
  28. </li>
  29. )
  30. }
  31. }
  32. }