You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractSuspendedOverlay.js 865B

123456789101112131415161718192021222324252627282930313233
  1. /* @flow */
  2. import { Component } from 'react';
  3. /**
  4. * The type of the React {@code Component} props of
  5. * {@link AbstractSuspendedOverlay}.
  6. */
  7. type Props = {
  8. /**
  9. * The function to translate human-readable text.
  10. */
  11. t: Function
  12. };
  13. /**
  14. * Implements a React {@link Component} for suspended overlay. Shown when a
  15. * suspend is detected.
  16. */
  17. export default class AbstractSuspendedOverlay extends Component<Props> {
  18. /**
  19. * Determines whether this overlay needs to be rendered (according to a
  20. * specific redux state). Called by {@link OverlayContainer}.
  21. *
  22. * @param {Object} state - The redux state.
  23. * @returns {boolean} - If this overlay needs to be rendered, {@code true};
  24. * {@code false}, otherwise.
  25. */
  26. static needsRender(state: Object) {
  27. return state['features/overlay'].suspendDetected;
  28. }
  29. }