Skip to content

Commit 1852a2d

Browse files
committed
removed the remote curosr completely on canvas when a user left the room
1 parent be01df7 commit 1852a2d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Dockerrun.aws.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"Environment": [
1313
{
1414
"Name": "API_BASE_URL",
15-
"Value": "Reactype-v17env.eba-sw2fhsbj.us-east-1.elasticbeanstalk.com"
15+
"Value": "Reactype-v19env.eba-sw2fhsbj.us-east-1.elasticbeanstalk.com"
1616
}
1717
]
1818
}

app/src/components/main/Canvas.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ function Canvas(props: {}): JSX.Element {
9797
// Removes the mouse cursor of the user that leaves the collaboration room.
9898
const handleCursorDeleteFromServer = () => {
9999
setRemoteCursors((prevRemoteCursors) =>
100-
prevRemoteCursors.map((cursor) => ({
101-
...cursor,
102-
isVisible: userList.includes(cursor.remoteUserName)
103-
}))
100+
// filter cursors to include only those in the userList
101+
prevRemoteCursors.filter((cursor) =>
102+
userList.includes(cursor.remoteUserName)
103+
)
104104
);
105105
};
106106

0 commit comments

Comments
 (0)