2020-04-15 13:13:43 +00:00
|
|
|
// @flow
|
|
|
|
|
2021-04-21 13:48:05 +00:00
|
|
|
/**
|
|
|
|
* Selector to return lobby state.
|
|
|
|
*
|
|
|
|
* @param {any} state - State object.
|
|
|
|
* @returns {any}
|
|
|
|
*/
|
|
|
|
export function getLobbyState(state: any) {
|
|
|
|
return state['features/lobby'];
|
|
|
|
}
|
2021-07-06 19:07:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-07-13 13:17:20 +00:00
|
|
|
* Selector to return array with knocking participant ids.
|
2021-07-06 19:07:52 +00:00
|
|
|
*
|
|
|
|
* @param {any} state - State object.
|
|
|
|
* @returns {Array}
|
|
|
|
*/
|
|
|
|
export function getKnockingParticipantsById(state: any) {
|
|
|
|
const { knockingParticipants } = state['features/lobby'];
|
|
|
|
|
|
|
|
return knockingParticipants.map(participant => participant.id);
|
|
|
|
}
|