Skip to content

Commit 04daec7

Browse files
tnagorrafrozenhelium
authored andcommitted
Rename "instruction" to "instructions"
1 parent 2a12896 commit 04daec7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

manager-dashboard/app/views/NewTutorial/ScenarioPageInput/index.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5757
interface ScenarioSegmentType {
58-
value: 'instruction' | 'hint' | 'success';
58+
value: 'instructions' | 'hint' | 'success';
5959
label: string;
6060
}
6161

6262
const 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}

manager-dashboard/app/views/NewTutorial/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export interface TutorialFormType {
365365
icon: IconKey;
366366
title: string;
367367
};
368-
instruction: {
368+
instructions: {
369369
description: string;
370370
icon: IconKey;
371371
title: string;
@@ -479,7 +479,7 @@ export const tutorialFormSchema: TutorialFormSchema = {
479479
icon: { required: true },
480480
}),
481481
},
482-
instruction: {
482+
instructions: {
483483
fields: () => ({
484484
title: {
485485
required: true,

0 commit comments

Comments
 (0)