@@ -10,7 +10,6 @@ import {
10
10
import { IsaacContent } from "./IsaacContent" ;
11
11
import * as ApiTypes from "../../../IsaacApiTypes" ;
12
12
import { ContentDTO } from "../../../IsaacApiTypes" ;
13
- import * as RS from "reactstrap" ;
14
13
import {
15
14
below ,
16
15
determineFastTrackPrimaryAction ,
@@ -35,6 +34,7 @@ import { submitInlineRegion, useInlineRegionPart } from "./IsaacInlineRegion";
35
34
import LLMFreeTextQuestionFeedbackView from "../elements/LLMFreeTextQuestionFeedbackView" ;
36
35
import { LLMFreeTextQuestionRemainingAttemptsView } from "../elements/LLMFreeTextQuestionRemainingAttemptsView" ;
37
36
import { skipToken } from "@reduxjs/toolkit/query" ;
37
+ import { Alert , Button , Col , Form , Row } from "reactstrap" ;
38
38
39
39
function useCanAttemptQuestionType ( questionType ?: string ) : ReturnType < typeof useCanAttemptQuestionTypeQuery > {
40
40
// We skip the check with the API if the question type is not a restricted question type
@@ -169,7 +169,7 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
169
169
< IsaacContent doc = { validationResponse ?. explanation as ContentDTO } /> ;
170
170
171
171
return < ConfidenceContext . Provider value = { { recordConfidence} } >
172
- < RS . Form onSubmit = { ( event ) => {
172
+ < Form onSubmit = { ( event ) => {
173
173
if ( event ) { event . preventDefault ( ) ; }
174
174
submitCurrentAttempt ( questionPart , doc . id as string , doc . type as string , currentGameboard , currentUser , dispatch ) ;
175
175
setHasSubmitted ( true ) ;
@@ -195,13 +195,13 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
195
195
}
196
196
197
197
{ /* CS Hint Reminder */ }
198
- { isAda && ( ! validationResponse || ! correct || canSubmit ) && < RS . Row >
199
- < RS . Col xl = { { size : 10 } } >
198
+ { isAda && ( ! validationResponse || ! correct || canSubmit ) && < Row >
199
+ < Col xl = { { size : 10 } } >
200
200
{ doc . hints && ! ! doc . hints . length && < p className = "no-print mb-0" >
201
201
< small > { "Don't forget to use the hints if you need help." } </ small >
202
202
</ p > }
203
- </ RS . Col >
204
- </ RS . Row > }
203
+ </ Col >
204
+ </ Row > }
205
205
206
206
{ /* CS Hints */ }
207
207
{ isAda && < IsaacLinkHints questionPartId = { doc . id as string } hints = { doc . hints } /> }
@@ -226,21 +226,21 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
226
226
< span > You can view feedback for a specific box by either selecting it above, or by using the control panel below.</ span >
227
227
< div className = { `feedback-panel-${ almost ? "light" : "dark" } ` } role = "note" aria-labelledby = "answer-feedback" >
228
228
< div className = { `w-100 mt-2 d-flex feedback-panel-header justify-content-around` } >
229
- < RS . Button color = "transparent" onClick = { ( ) => {
229
+ < Button color = "transparent" onClick = { ( ) => {
230
230
inlineContext . setFeedbackIndex ( ( ( inlineContext ?. feedbackIndex as number - 1 ) + numInlineQuestions ) % numInlineQuestions ) ;
231
231
} } >
232
232
{ below [ "xs" ] ( deviceSize ) ? "◀" : "Previous" }
233
- </ RS . Button >
234
- < RS . Button color = "transparent" className = "inline-part-jump align-self-center" onClick = { ( ) => {
233
+ </ Button >
234
+ < Button color = "transparent" className = "inline-part-jump align-self-center" onClick = { ( ) => {
235
235
if ( inlineContext . feedbackIndex ) inlineContext . setFocusSelection ( true ) ;
236
236
} } >
237
237
Box { inlineContext . feedbackIndex as number + 1 } of { numInlineQuestions }
238
- </ RS . Button >
239
- < RS . Button color = "transparent" onClick = { ( ) => {
238
+ </ Button >
239
+ < Button color = "transparent" onClick = { ( ) => {
240
240
inlineContext . setFeedbackIndex ( ( inlineContext ?. feedbackIndex as number + 1 ) % numInlineQuestions ) ;
241
241
} } >
242
242
{ below [ "xs" ] ( deviceSize ) ? "▶" : "Next" }
243
- </ RS . Button >
243
+ </ Button >
244
244
</ div >
245
245
< div className = "feedback-panel-content p-3" >
246
246
{ validationFeedback }
@@ -251,9 +251,9 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
251
251
</ div > }
252
252
253
253
{ /* Lock */ }
254
- { locked && < RS . Alert color = "danger" className = { "no-print" } >
254
+ { locked && < Alert color = "danger" className = { "no-print" } >
255
255
This question is locked until at least { < DateString formatter = { TIME_ONLY } > { locked } </ DateString > } to prevent repeated guessing.
256
- </ RS . Alert > }
256
+ </ Alert > }
257
257
258
258
{ /* Action Buttons */ }
259
259
{ recordConfidence ?
@@ -286,7 +286,7 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
286
286
< IsaacTabbedHints questionPartId = { doc . id as string } hints = { doc . hints } />
287
287
</ div > }
288
288
</ div >
289
- </ RS . Form >
289
+ </ Form >
290
290
291
291
{ /* LLM free-text question validation response */ }
292
292
{ isLLMFreeTextQuestion && showQuestionFeedback && validationResponse && showInlineAttemptStatus && ! canSubmit &&
0 commit comments