Skip to content

Commit

Permalink
Merge pull request #260 from tukcomCD2024/Frontend#259
Browse files Browse the repository at this point in the history
다중 접속 삭제(2)
  • Loading branch information
SINHJ1 authored Aug 21, 2024
2 parents 5e63da0 + ba27c3a commit 555c5e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions frontend/src/Component/Page/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,15 @@ function Page() {
// return;
// }
// }

// let userColor = yConnectedUserList.get(nickname) || yConnectedUserList.get(nicknameWithSuffix) || getRandomColor();
const userColor = yConnectedUserList.has(nickname) ? yConnectedUserList.get(nickname) : getRandomColor();

// if (!isSingleConnected) {
// yConnectedUserList.set(nickname, userColor);
// ydocProviderRef.current.awareness.setLocalStateField('user', { name: nickname, color: userColor });
yConnectedUserList.set(nickname, userColor);
ydocProviderRef.current.awareness.setLocalStateField('user', { name: nickname, color: userColor });
// } else {
// yConnectedUserList.set(nicknameWithSuffix, userColor);
// ydocProviderRef.current.awareness.setLocalStateField('user', { name: nicknameWithSuffix, color: userColor });
// }
let userColor = yConnectedUserList.get(nickname) || yConnectedUserList.get(nicknameWithSuffix) || getRandomColor();
yConnectedUserList.set(nickname, userColor);
ydocProviderRef.current.awareness.setLocalStateField('user', { name: nickname, color: userColor });
updateUsersAndColors();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ img.ProseMirror-separator {
background-image: url('/src/image/note_paper\(8\).svg');
background-size: 83% 260%;
background-repeat: no-repeat;
background-position: 16vw 0px;
background-position: 16vw -7vw;
background-attachment: fixed;
border-radius: 4px;
padding: 5px 0;
Expand Down

0 comments on commit 555c5e8

Please sign in to comment.