mirror of
https://github.com/edumeet/edumeet.git
synced 2026-07-31 15:00:37 +00:00
Simplify selector.
This commit is contained in:
parent
105e245c7e
commit
0dee1eb1bb
1 changed files with 1 additions and 8 deletions
|
|
@ -71,14 +71,7 @@ export const spotlightsLengthSelector = createSelector(
|
|||
export const spotlightPeersSelector = createSelector(
|
||||
spotlightsSelector,
|
||||
peersKeySelector,
|
||||
(spotlights, peers) =>
|
||||
peers.reduce((result, peerId) =>
|
||||
{
|
||||
if (spotlights.includes(peerId))
|
||||
result.push(peerId);
|
||||
|
||||
return result;
|
||||
}, [])
|
||||
(spotlights, peers) => peers.filter((peerId) => spotlights.includes(peerId))
|
||||
);
|
||||
|
||||
export const peersLengthSelector = createSelector(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue