Skip to content

Commit

Permalink
fix(app): fix pipette wizard flows always showing "recalibrate" on re…
Browse files Browse the repository at this point in the history
…sults step (#13792)

* fix(app): fix pipette wizard flows always showing "recalibrate" on results step

Persists hasCalData between renders so as not to return true during the attach/calibration wizard
flow after the calibration step.
  • Loading branch information
mjhuff authored Oct 16, 2023
1 parent 5a8163a commit 9cdeaf4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/organisms/PipetteWizardFlows/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ export const PipetteWizardFlows = (
const [isFetchingPipettes, setIsFetchingPipettes] = React.useState<boolean>(
false
)
const hasCalData =
attachedPipettes[mount]?.data.calibratedOffset?.last_modified != null
const memoizedAttachedPipettes = React.useMemo(() => attachedPipettes, [])
const hasCalData =
memoizedAttachedPipettes[mount]?.data.calibratedOffset?.last_modified !=
null
const wizardTitle = usePipetteFlowWizardHeaderText({
flowType,
mount,
Expand Down

0 comments on commit 9cdeaf4

Please sign in to comment.