File tree Expand file tree Collapse file tree
src/editors/containers/ProblemEditor
components/EditProblemView/AnswerWidget Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ const AnswerOption = ({
8181 value = { answer . title }
8282 onChange = { ( e ) => {
8383 setAnswerTitle ( e ) ;
84- mutate ( { title : e . target . value } ) ;
84+ mutate ( e . target . value ) ;
8585 } }
8686 placeholder = { intl . formatMessage ( messages . answerTextboxPlaceholder ) }
8787
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ import api from '@src/editors/data/services/cms/api';
55const getApiBaseUrl = ( ) => getConfig ( ) . STUDIO_BASE_URL ;
66
77export const useValidateInputBlock = ( ) => useMutation ( {
8- mutationFn : async ( { title } ) => {
8+ mutationFn : async ( title ) => {
99 try {
1010 const res = await api . validateBlockNumericInput ( { studioEndpointUrl : `${ getApiBaseUrl ( ) } ` , data : { formula : title } } ) ;
1111 return res . data ;
12- } catch ( err ) {
12+ } catch ( err : any ) {
1313 return {
1414 is_valid : false ,
1515 error : err . response ?. data ?. error ?? 'Unknown error' ,
You can’t perform that action at this time.
0 commit comments