From e684a6eeaa11c24e649286a8730ae7eadbd7bf97 Mon Sep 17 00:00:00 2001 From: John Bowser Date: Thu, 15 Dec 2022 11:39:46 -0700 Subject: [PATCH] typo and linting fixes --- .../localization/en/robot_calibration.json | 2 +- .../Devices/hooks/useGenerateTaskList.ts | 49 ++++++++++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/app/src/assets/localization/en/robot_calibration.json b/app/src/assets/localization/en/robot_calibration.json index 4f9f76436c4..dcda87461bd 100644 --- a/app/src/assets/localization/en/robot_calibration.json +++ b/app/src/assets/localization/en/robot_calibration.json @@ -15,7 +15,7 @@ "calibration_block_description": "This block is a specially made tool that fits perfectly on your deck and helps with calibration. If you do not have a Calibration Block, please contact us so we can send you one.While you wait for the block to arrive, you can use the flat surface on the trash bin of your robot instead.", "calibration_health_check": "Calibration Health Check", "calibration_health_check_intro_body": "Calibration Health Check diagnoses problems with Deck, Tip Length, and Pipette Offset Calibration.You will move the pipettes to various positions, which will be compared against your existing calibration data.If there is a large difference, you will be prompted to redo some or all of your calibrations.", - "calibrate_tip_length": "Calibrate the length if a tip on this pipette.", + "calibrate_tip_length": "Calibrate the length of a tip on this pipette.", "change_tip_rack": "Change tip rack", "check_tip_on_block": "Check tip on block", "check_tip_on_trash": "Check tip on trash bin", diff --git a/app/src/organisms/Devices/hooks/useGenerateTaskList.ts b/app/src/organisms/Devices/hooks/useGenerateTaskList.ts index fbc117f4b80..33dd2e6ac64 100644 --- a/app/src/organisms/Devices/hooks/useGenerateTaskList.ts +++ b/app/src/organisms/Devices/hooks/useGenerateTaskList.ts @@ -72,7 +72,11 @@ export function useGenerateTaskList(robotName: string): TaskListProps { const pipetteTask: TaskProps = { activeIndex: activeTaskIndices, subTasks: [], - title: t(mount === 'left' ? 'devices_landing:left_mount' : 'devices_landing:right_mount'), + title: t( + mount === 'left' + ? 'devices_landing:left_mount' + : 'devices_landing:right_mount' + ), description: '', taskIndex, taskListLength: TASK_LIST_LENGTH, @@ -124,13 +128,19 @@ export function useGenerateTaskList(robotName: string): TaskListProps { tipLengthSubTask.footer = t('robot_calibration:last_completed_on', { timestamp: formatTimestamp(tipLengthCalForPipette.lastModified), }) - tipLengthSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} } + tipLengthSubTask.cta = { + label: t('robot_calibration:recalibrate'), + onClick: () => {}, + } tipLengthSubTask.isComplete = true offsetSubTask.footer = t('robot_calibration:last_completed_on', { timestamp: formatTimestamp(offsetCalForPipette.lastModified), }) - offsetSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} } + offsetSubTask.cta = { + label: t('robot_calibration:recalibrate'), + onClick: () => {}, + } offsetSubTask.isComplete = true // also the parent pipette task can be marked as complete as well @@ -158,14 +168,22 @@ export function useGenerateTaskList(robotName: string): TaskListProps { // only updating this if it is still null, otherwise we'd be forgetting about the previous task that already modified this activeTaskIndices = [taskIndex, 0] } - tipLengthSubTask.description = t('robot_calibration:calibrate_tip_length') - tipLengthSubTask.cta = { label: t('robot_calibration:calibrate'), onClick: () => {} } + tipLengthSubTask.description = t( + 'robot_calibration:calibrate_tip_length' + ) + tipLengthSubTask.cta = { + label: t('robot_calibration:calibrate'), + onClick: () => {}, + } } else { // the tip length calibration is present and valid tipLengthSubTask.footer = t('robot_calibration:last_completed_on', { timestamp: formatTimestamp(tipLengthCalForPipette.lastModified), }) - tipLengthSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} } + tipLengthSubTask.cta = { + label: t('robot_calibration:recalibrate'), + onClick: () => {}, + } tipLengthSubTask.isComplete = true } @@ -177,16 +195,25 @@ export function useGenerateTaskList(robotName: string): TaskListProps { if (activeTaskIndices == null) { activeTaskIndices = [taskIndex, 1] } - offsetSubTask.description = t('robot_calibration:pipette_offset_calibration_on_mount', { - mount, - }) - offsetSubTask.cta = { label: t('robot_calibration:calibrate'), onClick: () => {} } + offsetSubTask.description = t( + 'robot_calibration:pipette_offset_calibration_on_mount', + { + mount, + } + ) + offsetSubTask.cta = { + label: t('robot_calibration:calibrate'), + onClick: () => {}, + } } else { // the tip length calibration is present and valid offsetSubTask.footer = t('robot_calibration:last_completed_on', { timestamp: formatTimestamp(offsetCalForPipette.lastModified), }) - offsetSubTask.cta = { label: t('robot_calibration:recalibrate'), onClick: () => {} } + offsetSubTask.cta = { + label: t('robot_calibration:recalibrate'), + onClick: () => {}, + } offsetSubTask.isComplete = true }