mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
clean console
This commit is contained in:
parent
d995b259e3
commit
949f0d10cc
2 changed files with 1 additions and 7 deletions
|
|
@ -42,24 +42,20 @@ const JoinRoom: React.FC = () => {
|
|||
console.log('Successfully joined the room.');
|
||||
});
|
||||
socket.on('next-question', (question: QuestionType) => {
|
||||
console.log("NEXT MODE!")
|
||||
setQuizMode('teacher');
|
||||
setIsWaitingForTeacher(false);
|
||||
setQuestion(question);
|
||||
});
|
||||
socket.on('launch-student-mode', (questions: QuestionType[]) => {
|
||||
console.log("STODENT MODE!")
|
||||
setQuizMode('student');
|
||||
setIsWaitingForTeacher(false);
|
||||
setQuestions(questions);
|
||||
setQuestion(questions[0]);
|
||||
});
|
||||
socket.on('end-quiz', () => {
|
||||
console.log("END!")
|
||||
disconnect();
|
||||
});
|
||||
socket.on('join-failure', (message) => {
|
||||
console.log("BIG FAIL!")
|
||||
console.log('Failed to join the room.');
|
||||
setConnectionError(`Erreur de connexion : ${message}`);
|
||||
setIsConnecting(false);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ const ManageRoom: React.FC = () => {
|
|||
setConnectingError('');
|
||||
const socket = webSocketService.connect(ENV_VARIABLES.VITE_BACKEND_URL);
|
||||
|
||||
console.log(socket);
|
||||
socket.on('connect', () => {
|
||||
webSocketService.createRoom();
|
||||
});
|
||||
|
|
@ -105,7 +104,6 @@ const ManageRoom: React.FC = () => {
|
|||
});
|
||||
socket.on('user-disconnected', (userId: string) => {
|
||||
setUsers((prevUsers) => prevUsers.filter((user) => user.id !== userId));
|
||||
console.log(userId);
|
||||
});
|
||||
setSocket(socket);
|
||||
};
|
||||
|
|
@ -201,7 +199,7 @@ const ManageRoom: React.FC = () => {
|
|||
const showSelectedQuestion = (questionIndex: number) => {
|
||||
if (quiz?.content && quizQuestions) {
|
||||
setCurrentQuestion(quizQuestions[questionIndex]);
|
||||
console.log(quizQuestions[questionIndex]);
|
||||
|
||||
if (quizMode === 'teacher') {
|
||||
webSocketService.nextQuestion(roomName, quizQuestions[questionIndex]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue