Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Oct 15, 2024
1 parent 4c4c100 commit 2deeeed
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export const compactPreIngreds = (
})
}

export function getMetaSelectedSteps(
export const getMetaSelectedSteps = (
multiSelectItemIds: StepIdType[] | null,
stepId: StepIdType,
selectedStepId: StepIdType | null
): StepIdType[] {
): StepIdType[] => {
let stepsToSelect: StepIdType[]
if (multiSelectItemIds?.length) {
// already have a selection, add/remove the meta-clicked item
Expand All @@ -78,13 +78,13 @@ export function getMetaSelectedSteps(
return stepsToSelect
}

export function getShiftSelectedSteps(
export const getShiftSelectedSteps = (
selectedStepId: StepIdType | null,
orderedStepIds: StepIdType[],
stepId: StepIdType,
multiSelectItemIds: StepIdType[] | null,
lastMultiSelectedStepId: StepIdType | null
): StepIdType[] {
): StepIdType[] => {
let stepsToSelect: StepIdType[]
if (selectedStepId) {
stepsToSelect = getOrderedStepsInRange(
Expand Down Expand Up @@ -122,11 +122,11 @@ export function getShiftSelectedSteps(
return stepsToSelect
}

function getOrderedStepsInRange(
const getOrderedStepsInRange = (
lastSelectedStepId: StepIdType,
stepId: StepIdType,
orderedStepIds: StepIdType[]
): StepIdType[] {
): StepIdType[] => {
const prevIndex: number = orderedStepIds.indexOf(lastSelectedStepId)
const currentIndex: number = orderedStepIds.indexOf(stepId)

Expand Down

0 comments on commit 2deeeed

Please sign in to comment.