Skip to content

Commit 7e407ba

Browse files
committed
WIP linting
1 parent 067ca19 commit 7e407ba

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/FillWellAndSkip.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export function FillWell(props: RecoveryContentProps): JSX.Element | null {
5959
well: failedLabwareUtils.relevantWellName,
6060
})}
6161
type="location"
62+
layout='default'
6263
/>
6364
</Flex>
6465
<Flex marginTop="1.742rem">

app/src/organisms/ErrorRecoveryFlows/hooks/useFailedLabwareUtils.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type {
2323
MoveLabwareRunTimeCommand,
2424
StackerRetriveRunTimeCommand,
2525
LabwareLocation,
26+
LoadedModule,
2627
} from '@opentrons/shared-data'
2728

2829
import {
@@ -61,7 +62,7 @@ export type UseFailedLabwareUtilsResult = UseTipSelectionUtilsResult & {
6162
failedLabwareNickname: string | null
6263
/* Details relating to the labware location. */
6364
failedLabwareLocations: RelevantFailedLabwareLocations
64-
labwareQuantity: string | null
65+
labwareQuantity: string | undefined
6566
}
6667

6768
/** Utils for labware relating to the failedCommand.
@@ -322,11 +323,11 @@ export function getFailedLabwareQuantity(
322323
total = setStoredLabware?.params.initialCount
323324
const retreiveCmds = itemsBeforefailedCmd?.filter(
324325
cmd => cmd.commandType === 'flexStacker/retrieve'
325-
).length
326+
).length ?? 0
326327
const storeCmds = itemsBeforefailedCmd?.filter(
327328
cmd => cmd.commandType === 'flexStacker/store'
328-
).length
329-
return 'Quantity: ' + total - retreiveCmds + storeCmds
329+
).length ?? 0
330+
return 'Quantity: ' + (total - retreiveCmds + storeCmds)
330331
} else return 'Quantity: 0'
331332
}
332333
return null
@@ -485,7 +486,7 @@ export function useRelevantFailedLwLocations({
485486
displayNameNewLoc: getLabwareDisplayLocation({
486487
...BASE_DISPLAY_PARAMS,
487488
location: BASE_DISPLAY_PARAMS.loadedModules.find(
488-
m => m.id === failedCommandByRunRecord?.params.moduleId
489+
(m : LoadedModule) => m.id === failedCommandByRunRecord?.params.moduleId
489490
).location,
490491
}),
491492
newLoc: {

app/src/organisms/ErrorRecoveryFlows/shared/LeftColumnLabwareInfo.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export function LeftColumnLabwareInfo({
3030
const { displayNameNewLoc, displayNameCurrentLoc } = failedLabwareLocations
3131
const { step } = recoveryMap
3232
const {
33-
MANUAL_REPLACE_AND_RETRY,
3433
MANUAL_REPLACE_STACKER_AND_RETRY,
3534
MANUAL_LOAD_IN_STACKER_AND_SKIP,
3635
} = RECOVERY_MAP
@@ -62,13 +61,13 @@ export function LeftColumnLabwareInfo({
6261
}
6362
}
6463

65-
const buildQuntity = (): string | null => {
64+
const buildQuntity = (): string | undefined => {
6665
switch (step) {
6766
case MANUAL_REPLACE_STACKER_AND_RETRY.STEPS.CONFIRM_RETRY:
6867
case MANUAL_LOAD_IN_STACKER_AND_SKIP.STEPS.CONFIRM_RETRY:
6968
return labwareQuantity
7069
case MANUAL_LOAD_IN_STACKER_AND_SKIP.STEPS.MANUAL_REPLACE:
71-
return null
70+
return undefined
7271
default:
7372
return labwareQuantity
7473
}

app/src/organisms/ErrorRecoveryFlows/shared/__tests__/LeftColumnLabwareInfo.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ describe('LeftColumnLabwareInfo', () => {
3333
},
3434
} as any,
3535
type: 'location',
36+
layout: 'default',
3637
bannerText: 'MOCK_BANNER_TEXT',
3738
}
3839

0 commit comments

Comments
 (0)