您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.js 930B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // @flow
  2. /**
  3. * Selector to return lobby enable state.
  4. *
  5. * @param {any} state - State object.
  6. * @returns {boolean}
  7. */
  8. export function getLobbyEnabled(state: any) {
  9. return state['features/lobby'].lobbyEnabled;
  10. }
  11. /**
  12. * Selector to return a list of knocking participants.
  13. *
  14. * @param {any} state - State object.
  15. * @returns {Array<Object>}
  16. */
  17. export function getKnockingParticipants(state: any) {
  18. return state['features/lobby'].knockingParticipants;
  19. }
  20. /**
  21. * Selector to return lobby visibility.
  22. *
  23. * @param {any} state - State object.
  24. * @returns {any}
  25. */
  26. export function getIsLobbyVisible(state: any) {
  27. return state['features/lobby'].lobbyVisible;
  28. }
  29. /**
  30. * Selector to return array with knocking participant ids.
  31. *
  32. * @param {any} state - State object.
  33. * @returns {Array}
  34. */
  35. export function getKnockingParticipantsById(state: any) {
  36. return getKnockingParticipants(state).map(participant => participant.id);
  37. }