From 2deeeedd9f4b81dbbae0475aff6a791bfa65655e Mon Sep 17 00:00:00 2001 From: Jethary Date: Tue, 15 Oct 2024 13:10:51 -0400 Subject: [PATCH] address feedback --- .../pages/Designer/ProtocolSteps/Timeline/utils.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/utils.ts b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/utils.ts index 413a9c84096..c7f6f812dc2 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/utils.ts +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/utils.ts @@ -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 @@ -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( @@ -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)