Skip to content

Commit

Permalink
Clean up comments for outdated code
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnetteeee committed Nov 6, 2024
1 parent a280248 commit a625c99
Showing 1 changed file with 2 additions and 32 deletions.
34 changes: 2 additions & 32 deletions peer-prep-fe/src/collab-page/collab-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class CollabPageComponent implements OnInit, OnDestroy {
this.userId = this.route.snapshot.queryParamMap.get('userId') || '';

this.fetchSessionData();
// this.username = '123';

// Connect to editor
this.webSocketService.connect(this.sessionId, this.userId);
})
Expand All @@ -59,47 +59,17 @@ export class CollabPageComponent implements OnInit, OnDestroy {
},
error => {
console.error("Failed to fetch session data", error);
// this.endSession()
}
);
}



// fetchSessionData(): void{
// console.log("CURRENTLY AT BEFORE FETCHING QUESTION");
// // return new Promise((resolve, reject) => {
// this.sessionSubscription = this.collabService.getSession(this.sessionId).subscribe(
// (session: Session) => {
// console.log("SESSION: ", session);
// if (session && session.question) {
// this.question = session.question;
// console.log("Fetched session question", this.question);
// }
// this.username = session.users.username1;
// console.log("username 1: ", this.username);
// this.pairedUsername = session.users.username2;
// console.log("username 2: ", this.pairedUsername);
// resolve(); // Resolve the promise when data is fetched
// },
// error => {
// console.error("Failed to fetch session data", error);
// reject(error); // Reject the promise on error
// }
// );
// });
// }

// navigates back to landing page and disconnects websocket session
endSession(): void {
this.webSocketService.disconnect();
this.router.navigate(['landing']);
}

// endCollab(): void {
// this.collabService.endSession(this.sessionId).subscribe(
// }


ngOnDestroy(): void {
// this.endSession();
if (this.routeSubscription) {
Expand Down

0 comments on commit a625c99

Please sign in to comment.