diff --git a/teachertool/src/state/actions.ts b/teachertool/src/state/actions.ts index d6178354f07..423bd54fa61 100644 --- a/teachertool/src/state/actions.ts +++ b/teachertool/src/state/actions.ts @@ -55,9 +55,9 @@ type SetRubric = ActionBase & { rubric: Rubric; }; -type SetConfirmationProps = ActionBase & { - type: "SET_CONFIRMATION_PROPS"; - props: ConfirmationModalOptions | undefined; +type SetConfirmationOptions = ActionBase & { + type: "SET_CONFIRMATION_OPTIONS"; + options: ConfirmationModalOptions | undefined; }; type ShowModal = ActionBase & { @@ -98,7 +98,7 @@ export type Action = | SetTargetConfig | SetCatalog | SetRubric - | SetConfirmationProps + | SetConfirmationOptions | ShowModal | HideModal | SetValidatorPlans @@ -153,9 +153,9 @@ const setRubric = (rubric: Rubric): SetRubric => ({ rubric, }); -const setConfirmationProps = (props: ConfirmationModalOptions | undefined): SetConfirmationProps => ({ - type: "SET_CONFIRMATION_PROPS", - props, +const setConfirmationOptions = (options: ConfirmationModalOptions | undefined): SetConfirmationOptions => ({ + type: "SET_CONFIRMATION_OPTIONS", + options, }); const showModal = (modal: ModalType): ShowModal => ({ @@ -192,7 +192,7 @@ export { setTargetConfig, setCatalog, setRubric, - setConfirmationProps, + setConfirmationOptions, showModal, hideModal, setValidatorPlans, diff --git a/teachertool/src/state/reducer.ts b/teachertool/src/state/reducer.ts index 2ac0e02e32f..43696e408fc 100644 --- a/teachertool/src/state/reducer.ts +++ b/teachertool/src/state/reducer.ts @@ -67,10 +67,10 @@ export default function reducer(state: AppState, action: Action): AppState { rubric: action.rubric, }; } - case "SET_CONFIRMATION_PROPS": { + case "SET_CONFIRMATION_OPTIONS": { return { ...state, - confirmationOptions: action.props, + confirmationOptions: action.options, }; } case "SHOW_MODAL": { diff --git a/teachertool/src/transforms/confirmAsync.ts b/teachertool/src/transforms/confirmAsync.ts index 961ee173114..effd983fd6e 100644 --- a/teachertool/src/transforms/confirmAsync.ts +++ b/teachertool/src/transforms/confirmAsync.ts @@ -7,7 +7,7 @@ export async function confirmAsync(title: string, message: string, cautionLevel: const { dispatch } = stateAndDispatch(); return new Promise(resolve => { dispatch( - Actions.setConfirmationProps({ + Actions.setConfirmationOptions({ title, message, cautionLevel,