You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -125,6 +134,12 @@ function Canvas(props: {}): JSX.Element {
125
134
126
135
console.log('Toggle Switch:',toggleSwitch);
127
136
137
+
//Function to handle the click events.
138
+
constmultipleClicks=()=>{
139
+
handleToggleSwitch();
140
+
toggleButton();
141
+
};
142
+
128
143
constsocket=getSocket();
129
144
//wrap the socket event listener in useEffect with dependency array as [socket], so the the effect will run only when: 1. After the initial rendering of the component 2. Every time the socket instance changes(connect, disconnect)
130
145
useEffect(()=>{
@@ -169,7 +184,7 @@ function Canvas(props: {}): JSX.Element {
169
184
childId?: number|null
170
185
)=>{
171
186
dispatch(changeFocus({ componentId, childId }));
172
-
//if room exists, send focus dispatcht to all users
187
+
//if room exists, send focus dispatch to all users
173
188
if(roomCode){
174
189
emitEvent('changeFocusAction',roomCode,{
175
190
componentId: componentId,
@@ -350,18 +365,29 @@ function Canvas(props: {}): JSX.Element {
0 commit comments