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.

functions.js 515B

123456789101112131415161718192021222324
  1. // @flow
  2. /**
  3. * Selector to return lobby state.
  4. *
  5. * @param {any} state - State object.
  6. * @returns {any}
  7. */
  8. export function getLobbyState(state: any) {
  9. return state['features/lobby'];
  10. }
  11. /**
  12. * Selector to return array with knocking participant ids.
  13. *
  14. * @param {any} state - State object.
  15. * @returns {Array}
  16. */
  17. export function getKnockingParticipantsById(state: any) {
  18. const { knockingParticipants } = state['features/lobby'];
  19. return knockingParticipants.map(participant => participant.id);
  20. }