@@ -203,8 +247,8 @@ const V2Examen = () => {
);
}
- const currentQuestion = caso.preguntas[currentQuestionIndex];
-
+ const currentQuestion = caso?.preguntas?.[currentQuestionIndex];
+
// Guard: if no question at current index, show error
if (!currentQuestion) {
return (
@@ -347,13 +391,15 @@ const V2Examen = () => {
iconColor = 'var(--md-sys-color-on-primary)';
}
+ const shortcut = rIdx + 1;
return (
);
@@ -398,9 +449,10 @@ const V2Examen = () => {
style={{ padding: '0 40px' }}
onClick={handleSubmitAnswer}
disabled={selectedAnswer === undefined}
- aria-label='Confirmar respuesta'
+ aria-label='Confirmar respuesta (atajo: Enter)'
+ title='Atajo: Enter'
>
- Confirmar Respuesta
+ Confirmar Respuesta
[Enter]
check_circle
{selectedAnswer === undefined && (
@@ -430,9 +482,10 @@ const V2Examen = () => {
className='v2-btn-filled v2-btn-h-56'
style={{ padding: '0 40px' }}
onClick={handleNext}
- aria-label='Siguiente pregunta'
+ aria-label='Siguiente pregunta (atajo: Enter)'
+ title='Atajo: Enter'
>
- Siguiente
+ Siguiente
[Enter]
arrow_forward
)}
@@ -441,9 +494,10 @@ const V2Examen = () => {
className='v2-btn-filled v2-btn-h-56'
style={{ padding: '0 40px' }}
onClick={handleNext}
- aria-label='Ver resumen de sesión'
+ aria-label='Ver resumen de sesión (atajo: Enter)'
+ title='Atajo: Enter'
>
- Ver Resumen
+ Ver Resumen
[Enter]
emoji_events
)}