= ({
{error}
) : isPreviewReady ? (
) : (
Chargement de la prévisualisation...
diff --git a/client/src/components/GiftTemplate/templates/TextTypeTemplate.ts b/client/src/components/GiftTemplate/templates/TextTypeTemplate.ts
index 8a3e24b..c86b25e 100644
--- a/client/src/components/GiftTemplate/templates/TextTypeTemplate.ts
+++ b/client/src/components/GiftTemplate/templates/TextTypeTemplate.ts
@@ -4,7 +4,7 @@ import katex from 'katex';
import { TextFormat } from 'gift-pegjs';
import DOMPurify from 'dompurify'; // cleans HTML to prevent XSS attacks, etc.
-export function formatLatex(text: string): string {
+function formatLatex(text: string): string {
return text
.replace(/\$\$(.*?)\$\$/g, (_, inner) => katex.renderToString(inner, { displayMode: true }))
.replace(/\$(.*?)\$/g, (_, inner) => katex.renderToString(inner, { displayMode: false }))
diff --git a/client/src/components/LiveResults/LiveResults.tsx b/client/src/components/LiveResults/LiveResults.tsx
index a230630..13611eb 100644
--- a/client/src/components/LiveResults/LiveResults.tsx
+++ b/client/src/components/LiveResults/LiveResults.tsx
@@ -12,6 +12,7 @@ import {
import { StudentType } from '../../Types/StudentType';
import LiveResultsTable from './LiveResultsTable';
+
interface LiveResultsProps {
socket: Socket | null;
questions: QuestionType[];
diff --git a/client/src/components/QuestionsDisplay/questionStyle.css b/client/src/components/QuestionsDisplay/questionStyle.css
index 3958e92..cdf611f 100644
--- a/client/src/components/QuestionsDisplay/questionStyle.css
+++ b/client/src/components/QuestionsDisplay/questionStyle.css
@@ -27,7 +27,6 @@
}
.question-wrapper .katex {
- display: block;
text-align: center;
}
@@ -120,9 +119,9 @@
}
.feedback-container {
- margin-left: 1.1rem;
- display: inline-flex !important; /* override the parent */
+ display: inline-block !important; /* override the parent */
align-items: center;
+ margin-left: 1.1rem;
position: relative;
padding: 0 0.5rem;
background-color: hsl(43, 100%, 94%);
diff --git a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx
index ae2d382..dea9af3 100644
--- a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx
+++ b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx
@@ -26,8 +26,11 @@ const TeacherModeQuiz: React.FC = ({
const [feedbackMessage, setFeedbackMessage] = useState('');
useEffect(() => {
+ // Close the feedback dialog when the question changes
+ handleFeedbackDialogClose();
setIsAnswerSubmitted(false);
- }, [questionInfos]);
+
+ }, [questionInfos.question]);
const handleOnSubmitAnswer = (answer: string | number | boolean) => {
const idQuestion = Number(questionInfos.question.id) || -1;