@100mslive/roomkit-react 0.3.12-alpha.3 → 0.3.12-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.12-alpha.3",
13
+ "version": "0.3.12-alpha.4",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -74,12 +74,12 @@
74
74
  "react": ">=17.0.2 <19.0.0"
75
75
  },
76
76
  "dependencies": {
77
- "@100mslive/hls-player": "0.3.12-alpha.3",
77
+ "@100mslive/hls-player": "0.3.12-alpha.4",
78
78
  "@100mslive/hms-noise-cancellation": "0.0.1",
79
- "@100mslive/hms-virtual-background": "1.13.12-alpha.3",
80
- "@100mslive/hms-whiteboard": "0.0.2-alpha.3",
81
- "@100mslive/react-icons": "0.10.12-alpha.3",
82
- "@100mslive/react-sdk": "0.10.12-alpha.3",
79
+ "@100mslive/hms-virtual-background": "1.13.12-alpha.4",
80
+ "@100mslive/hms-whiteboard": "0.0.2-alpha.4",
81
+ "@100mslive/react-icons": "0.10.12-alpha.4",
82
+ "@100mslive/react-sdk": "0.10.12-alpha.4",
83
83
  "@100mslive/types-prebuilt": "0.12.8",
84
84
  "@emoji-mart/data": "^1.0.6",
85
85
  "@emoji-mart/react": "^1.0.1",
@@ -115,5 +115,5 @@
115
115
  "uuid": "^8.3.2",
116
116
  "worker-timers": "^7.0.40"
117
117
  },
118
- "gitHead": "86fc40486a11a97f83ad8c21ccd78eeede6a5b30"
118
+ "gitHead": "1274c370d27307d203d1cffee2e2046726445e2e"
119
119
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef, useState } from 'react';
2
2
  import {
3
- selectLocalPeerID,
3
+ selectLocalPeer,
4
4
  selectPeerNameByID,
5
5
  selectPermissions,
6
6
  selectPollByID,
@@ -31,7 +31,9 @@ export const Voting = ({ id, toggleVoting }: { id: string; toggleVoting: () => v
31
31
  const showSingleView = poll?.type === 'quiz' && poll.state === 'started';
32
32
  const fetchedInitialResponses = useRef(false);
33
33
  const [savedResponses, setSavedResponses] = useState<Record<any, any>>({});
34
- const localPeerId = useHMSStore(selectLocalPeerID);
34
+ const localPeer = useHMSStore(selectLocalPeer);
35
+ const localPeerId = localPeer?.id;
36
+ const customerUserId = localPeer?.customerUserId;
35
37
 
36
38
  // To reset whenever a different poll is opened
37
39
  useEffect(() => {
@@ -51,7 +53,7 @@ export const Voting = ({ id, toggleVoting }: { id: string; toggleVoting: () => v
51
53
 
52
54
  useEffect(() => {
53
55
  if (poll?.questions) {
54
- const localPeerResponses = getPeerResponses(poll.questions, localPeerId);
56
+ const localPeerResponses = getPeerResponses(poll.questions, localPeerId, customerUserId);
55
57
  // @ts-ignore
56
58
  localPeerResponses?.forEach(response => {
57
59
  if (response) {
@@ -63,7 +65,7 @@ export const Voting = ({ id, toggleVoting }: { id: string; toggleVoting: () => v
63
65
  }
64
66
  });
65
67
  }
66
- }, [localPeerId, poll?.questions, id]);
68
+ }, [localPeerId, poll?.questions, id, customerUserId]);
67
69
 
68
70
  if (!poll) {
69
71
  return null;