mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Compare commits
No commits in common. "2a8913fadc6a8dfff4fa403b37a447bfd6f25409" and "8240de0a448f7a0ff2bd90c9edebc0953b2e57b6" have entirely different histories.
2a8913fadc
...
8240de0a44
2 changed files with 7 additions and 20 deletions
|
|
@ -111,12 +111,6 @@ const JoinRoom: React.FC = () => {
|
|||
webSocketService.submitAnswer(answerData);
|
||||
};
|
||||
|
||||
const handleReturnKey = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||
if (e.key === 'Enter' && username && roomName) {
|
||||
handleSocket();
|
||||
}
|
||||
};
|
||||
|
||||
if (isWaitingForTeacher) {
|
||||
return (
|
||||
<div className='room'>
|
||||
|
|
@ -173,8 +167,7 @@ const JoinRoom: React.FC = () => {
|
|||
onChange={(e) => setRoomName(e.target.value)}
|
||||
placeholder="Numéro de la salle"
|
||||
sx={{ marginBottom: '1rem' }}
|
||||
fullWidth={true}
|
||||
onKeyDown={handleReturnKey}
|
||||
fullWidth
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
|
@ -184,8 +177,7 @@ const JoinRoom: React.FC = () => {
|
|||
onChange={(e) => setUsername(e.target.value)}
|
||||
placeholder="Nom d'utilisateur"
|
||||
sx={{ marginBottom: '1rem' }}
|
||||
fullWidth={true}
|
||||
onKeyDown={handleReturnKey}
|
||||
fullWidth
|
||||
/>
|
||||
|
||||
<LoadingButton
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { useNavigate, Link } from 'react-router-dom';
|
||||
|
||||
// JoinRoom.tsx
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import './Login.css';
|
||||
|
|
@ -36,11 +38,6 @@ const Login: React.FC = () => {
|
|||
|
||||
};
|
||||
|
||||
const handleReturnKey = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||
if (e.key === 'Enter' && email && password) {
|
||||
login();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<LoginContainer
|
||||
|
|
@ -54,8 +51,7 @@ const Login: React.FC = () => {
|
|||
onChange={(e) => setEmail(e.target.value)}
|
||||
placeholder="Adresse courriel"
|
||||
sx={{ marginBottom: '1rem' }}
|
||||
fullWidth={true}
|
||||
onKeyDown={handleReturnKey} // Add this line as well
|
||||
fullWidth
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
|
@ -66,8 +62,7 @@ const Login: React.FC = () => {
|
|||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Mot de passe"
|
||||
sx={{ marginBottom: '1rem' }}
|
||||
fullWidth={true}
|
||||
onKeyDown={handleReturnKey} // Add this line as well
|
||||
fullWidth
|
||||
/>
|
||||
|
||||
<LoadingButton
|
||||
|
|
|
|||
Loading…
Reference in a new issue