Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

AbstractSuspendedOverlay.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import PropTypes from 'prop-types';
  2. import { Component } from 'react';
  3. /**
  4. * Implements a React Component for suspended overlay. Shown when a suspend is
  5. * detected.
  6. */
  7. export default class AbstractSuspendedOverlay extends Component {
  8. /**
  9. * SuspendedOverlay component's property types.
  10. *
  11. * @static
  12. */
  13. static propTypes = {
  14. /**
  15. * The function to translate human-readable text.
  16. *
  17. * @public
  18. * @type {Function}
  19. */
  20. t: PropTypes.func
  21. };
  22. /**
  23. * Check if this overlay needs to be rendered. This function will be called
  24. * by the {@code OverlayContainer}.
  25. *
  26. * @param {Object} state - The redux state.
  27. * @returns {boolean} - True if this overlay needs to be rendered, false
  28. * otherwise.
  29. */
  30. static needsRender(state) {
  31. return state['features/overlay'].suspendDetected;
  32. }
  33. /**
  34. * Implements React's {@link Component#render()}.
  35. *
  36. * @inheritdoc
  37. * @returns {ReactElement|null}
  38. */
  39. render() {
  40. return null;
  41. }
  42. }