@@ -42,7 +42,7 @@ type ScenarioType = {
4242 icon : IconKey ;
4343 title : string ;
4444 } ;
45- instruction : {
45+ instructions : {
4646 description : string ;
4747 icon : IconKey ;
4848 title : string ;
@@ -55,12 +55,12 @@ type ScenarioType = {
5555} ;
5656
5757interface ScenarioSegmentType {
58- value : 'instruction ' | 'hint' | 'success' ;
58+ value : 'instructions ' | 'hint' | 'success' ;
5959 label : string ;
6060}
6161
6262const previewOptions : ScenarioSegmentType [ ] = [
63- { value : 'instruction ' , label : 'Instruction' } ,
63+ { value : 'instructions ' , label : 'Instruction' } ,
6464 { value : 'hint' , label : 'Hint' } ,
6565 { value : 'success' , label : 'Success' } ,
6666] ;
@@ -99,16 +99,16 @@ export default function ScenarioPageInput(props: Props) {
9999 disabled,
100100 } = props ;
101101
102- const [ activeSegmentInput , setActiveInput ] = React . useState < ScenarioSegmentType [ 'value' ] > ( 'instruction ' ) ;
102+ const [ activeSegmentInput , setActiveInput ] = React . useState < ScenarioSegmentType [ 'value' ] > ( 'instructions ' ) ;
103103
104104 const onFieldChange = useFormObject (
105105 index ,
106106 onChange ,
107107 defaultScenarioTabsValue ,
108108 ) ;
109109
110- const onInstructionFieldChange = useFormObject < 'instruction ' , PartialScenarioType [ 'instruction ' ] > (
111- 'instruction ' ,
110+ const onInstructionFieldChange = useFormObject < 'instructions ' , PartialScenarioType [ 'instructions ' ] > (
111+ 'instructions ' ,
112112 onFieldChange ,
113113 { } ,
114114 ) ;
@@ -124,7 +124,7 @@ export default function ScenarioPageInput(props: Props) {
124124 ) ;
125125
126126 const error = getErrorObject ( riskyError ) ;
127- const instructionsError = getErrorObject ( error ?. instruction ) ;
127+ const instructionsError = getErrorObject ( error ?. instructions ) ;
128128 const hintError = getErrorObject ( error ?. hint ) ;
129129 const successError = getErrorObject ( error ?. success ) ;
130130
@@ -155,15 +155,15 @@ export default function ScenarioPageInput(props: Props) {
155155 < div className = { styles . scenarioFormContent } >
156156 < TextInput
157157 name = { 'title' as const }
158- value = { value . instruction ?. title }
158+ value = { value . instructions ?. title }
159159 label = "Title"
160160 onChange = { onInstructionFieldChange }
161161 error = { instructionsError ?. title }
162162 disabled = { disabled }
163163 />
164164 < TextInput
165165 name = { 'description' as const }
166- value = { value . instruction ?. description }
166+ value = { value . instructions ?. description }
167167 label = "Description"
168168 onChange = { onInstructionFieldChange }
169169 error = { instructionsError ?. description }
@@ -173,7 +173,7 @@ export default function ScenarioPageInput(props: Props) {
173173 < SelectInput
174174 name = "icon"
175175 label = "Icon"
176- value = { value . instruction ?. icon }
176+ value = { value . instructions ?. icon }
177177 options = { iconList }
178178 keySelector = { ( d : IconItem ) => d . key }
179179 labelSelector = { ( d : IconItem ) => d . label }
0 commit comments