Skip to content

Commit

Permalink
fix(app): fix calibration copy, 96 wizard attach title (#13927)
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 authored Nov 6, 2023
1 parent 31e5f49 commit 3c4964e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/src/assets/localization/en/device_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"are_you_sure_you_want_to_disconnect": "Are you sure you want to disconnect from {{ssid}}?",
"attach_a_pipette_before_calibrating": "Attach a pipette in order to perform calibration",
"boot_scripts": "Boot scripts",
"both": "Both",
"browse_file_system": "Browse file system",
"bug_fixes": "Bug Fixes",
"calibrate_deck": "Calibrate deck",
Expand Down
7 changes: 5 additions & 2 deletions app/src/organisms/PipetteWizardFlows/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ export const PipetteWizardFlows = (

const attachedPipettes = useAttachedPipettesFromInstrumentsQuery()
const memoizedPipetteInfo = React.useMemo(() => props.pipetteInfo ?? null, [])
const isGantryEmpty =
attachedPipettes[LEFT] == null && attachedPipettes[RIGHT] == null
const isGantryEmpty = React.useMemo(
() => attachedPipettes[LEFT] == null && attachedPipettes[RIGHT] == null,
[]
)

const pipetteWizardSteps = React.useMemo(
() =>
memoizedPipetteInfo == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { StyledText } from '../../../atoms/text'
import { OverflowMenu } from './OverflowMenu'
import { formatLastCalibrated, getDisplayNameForTipRack } from './utils'
import { getCustomLabwareDefinitions } from '../../../redux/custom-labware'
import { LEFT } from '../../../redux/pipettes'
import {
useAttachedPipettes,
useIsFlex,
Expand Down Expand Up @@ -66,10 +67,13 @@ export function PipetteOffsetCalibrationItems({
const attachedPipettesFromPipetteQuery = useAttachedPipettes()
const attachedPipetteFromInstrumentQuery = useAttachedPipettesFromInstrumentsQuery()
const isFlex = useIsFlex(robotName)
const attachedPipettes = Boolean(isFlex)
const attachedPipettes = isFlex
? attachedPipetteFromInstrumentQuery
: attachedPipettesFromPipetteQuery

const is96Attached =
// @ts-expect-error isFlex is a type narrower but not recognized as one
isFlex && attachedPipettes?.[LEFT]?.instrumentName === 'p1000_96'
return (
<StyledTable>
<thead>
Expand Down Expand Up @@ -97,7 +101,7 @@ export function PipetteOffsetCalibrationItems({
as="p"
textTransform={TYPOGRAPHY.textTransformCapitalize}
>
{calibration.mount}
{is96Attached ? t('both') : calibration.mount}
</StyledText>
</StyledTableCell>
{isFlex ? null : (
Expand Down

0 comments on commit 3c4964e

Please sign in to comment.