We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3946273 commit 58a4522Copy full SHA for 58a4522
peerprep/components/questionpage/CollabEditor.tsx
@@ -156,7 +156,9 @@ export default function CollabEditor({
156
};
157
158
newSocket.onmessage = (event) => {
159
- if (event.data == "Authentication failed") {
+ if (event.data == "Auth Success") {
160
+ setAuthenticated(true);
161
+ } else if (event.data == "Authentication failed") {
162
window.alert("Authentication failed");
163
newSocket.close();
164
router.push("/questions");
0 commit comments