Skip to content

Commit

Permalink
More renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed Feb 28, 2024
1 parent f080ac4 commit 720693f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions teachertool/src/state/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
Expand Down Expand Up @@ -98,7 +98,7 @@ export type Action =
| SetTargetConfig
| SetCatalog
| SetRubric
| SetConfirmationProps
| SetConfirmationOptions
| ShowModal
| HideModal
| SetValidatorPlans
Expand Down Expand Up @@ -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 => ({
Expand Down Expand Up @@ -192,7 +192,7 @@ export {
setTargetConfig,
setCatalog,
setRubric,
setConfirmationProps,
setConfirmationOptions,
showModal,
hideModal,
setValidatorPlans,
Expand Down
4 changes: 2 additions & 2 deletions teachertool/src/state/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion teachertool/src/transforms/confirmAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function confirmAsync(title: string, message: string, cautionLevel:
const { dispatch } = stateAndDispatch();
return new Promise<boolean>(resolve => {
dispatch(
Actions.setConfirmationProps({
Actions.setConfirmationOptions({
title,
message,
cautionLevel,
Expand Down

0 comments on commit 720693f

Please sign in to comment.