Skip to content

Commit

Permalink
wip: fixup spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole Watts committed Sep 23, 2024
1 parent 7f4e4a6 commit f8a6341
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export type InteractiveGraphAction =
| DeleteIntent
| ClickPoint
| ChangeInteractionMode
| ChangeKeyboardInvitationVibility;
| ChangeKeyboardInvitationVisibility;

export const actions = {
global: {
deleteIntent,
changeInteractionMode,
changeKeyboardInvitationVibility,
changeKeyboardInvitationVisibility,
},
angle: {
movePoint,
Expand Down Expand Up @@ -169,15 +169,15 @@ function changeInteractionMode(mode: InteractionMode): ChangeInteractionMode {
}

export const CHANGE_KEYBOARD_INVITATION_VISIBILITY =
"change-keyboard-interaction-invitation-visbility";
"change-keyboard-interaction-invitation-visibility";

export interface ChangeKeyboardInvitationVibility {
export interface ChangeKeyboardInvitationVisibility {
type: typeof CHANGE_KEYBOARD_INVITATION_VISIBILITY;
shouldShow: boolean;
}
function changeKeyboardInvitationVibility(
function changeKeyboardInvitationVisibility(
shouldShow: boolean,
): ChangeKeyboardInvitationVibility {
): ChangeKeyboardInvitationVisibility {
return {
type: CHANGE_KEYBOARD_INVITATION_VISIBILITY,
shouldShow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import {
CHANGE_INTERACTION_MODE,
type ChangeInteractionMode,
CHANGE_KEYBOARD_INVITATION_VISIBILITY,
type ChangeKeyboardInvitationVibility,
type ChangeKeyboardInvitationVisibility,
} from "./interactive-graph-action";

import type {Coord} from "../../../interactive2/types";
Expand Down Expand Up @@ -205,7 +205,7 @@ function doChangeInteractionMode(

function doChangeKeyboardInvitationVisibility(
state: InteractiveGraphState,
action: ChangeKeyboardInvitationVibility,
action: ChangeKeyboardInvitationVisibility,
): InteractiveGraphState {
if (state.type !== "point") {
return state;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,7 @@ export const StatefulMafsGraph = React.forwardRef<
// a bug where the graph would be marked "incorrect" during grading
// even if the user never interacted with it.
if (latestPropsRef.current !== originalPropsRef.current) {
dispatch(
reinitialize({
...latestPropsRef.current,
}),
);
dispatch(reinitialize(latestPropsRef.current));
}
}, [
graph.type,
Expand Down

0 comments on commit f8a6341

Please sign in to comment.