Created reducer and stateactions for lobby.

This commit is contained in:
Håvar Aambø Fosstveit
2019-10-15 08:03:18 +02:00
parent aa55adbb2d
commit 2e166ca2b2
2 changed files with 76 additions and 0 deletions
+24
View File
@@ -391,6 +391,30 @@ export const setPeerVolume = (peerId, volume) =>
};
};
export const addLobbyPeer = (lobbyPeer) =>
{
return {
type : 'ADD_LOBBY_PEER',
payload : { lobbyPeer }
};
};
export const removeLobbyPeer = (peerId) =>
{
return {
type : 'REMOVE_LOBBY_PEER',
payload : { peerId }
};
};
export const setLobbyPeerDisplayName = (displayName, peerId) =>
{
return {
type : 'SET_LOBBY_PEER_DISPLAY_NAME',
payload : { displayName, peerId }
};
};
export const addNotification = (notification) =>
{
return {