correction qrCode to qrcodecanvas

This commit is contained in:
NouhailaAater 2025-03-13 16:09:04 -04:00
parent 0243270fdb
commit fb41980f29
3 changed files with 595 additions and 595 deletions

1184
client/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -21,7 +21,7 @@ jest.mock('src/pages/Teacher/ManageRoom/RoomContext');
jest.mock('qrcode.react', () => ({ jest.mock('qrcode.react', () => ({
__esModule: true, __esModule: true,
default: (props: { value: string }) => <div data-testid="qr-code">{props.value}</div>, QRCodeCanvas: ({ value }: { value: string }) => <div data-testid="qr-code">{value}</div>,
})); }));
const mockSocket = { const mockSocket = {

View file

@ -33,7 +33,7 @@ import {
DialogActions DialogActions
} from '@mui/material'; } from '@mui/material';
import { AnswerType } from 'src/pages/Student/JoinRoom/JoinRoom'; import { AnswerType } from 'src/pages/Student/JoinRoom/JoinRoom';
import QRCode from 'qrcode.react'; import { QRCodeCanvas } from 'qrcode.react';
const ManageRoom: React.FC = () => { const ManageRoom: React.FC = () => {
const navigate = useNavigate(); const navigate = useNavigate();
@ -497,7 +497,7 @@ const ManageRoom: React.FC = () => {
</DialogContentText> </DialogContentText>
<div style={{ textAlign: 'center', margin: '20px 0' }}> <div style={{ textAlign: 'center', margin: '20px 0' }}>
<QRCode value={roomUrl} size={256} /> <QRCodeCanvas value={roomUrl} size={256} />
</div> </div>
<div style={{ wordBreak: 'break-all', textAlign: 'center' }}> <div style={{ wordBreak: 'break-all', textAlign: 'center' }}>