Skip to content

Commit

Permalink
Fix rebase issue with protocol run header
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 committed Aug 15, 2024
1 parent 46e11b7 commit 8054593
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,14 @@ export function ProtocolRunHeader({
mount: aPipetteWithTip?.mount,
robotType,
onSkipAndHome: () => {
closeCurrentRun()
closeCurrentRun({
onSuccess: () => {
if (isQuickTransfer) {
deleteRun(runId)
navigate(`/devices/${robotName}`)
}
},
})
},
})

Expand Down Expand Up @@ -290,14 +297,19 @@ export function ProtocolRunHeader({
...robotAnalyticsData,
},
})
closeCurrentRun({
onSuccess: () => {
if (isQuickTransfer) {
deleteRun(runId)
navigate(`/devices/${robotName}`)
}
},
})

// Close the run if no tips are attached after running tip check at least once.
// This marks the robot as "not busy" as soon as a run is cancelled if drop tip CTAs are unnecessary.
if (initialPipettesWithTipsCount === 0) {
closeCurrentRun({
onSuccess: () => {
if (isQuickTransfer) {
deleteRun(runId)
navigate(`/devices/${robotName}`)
}
},
})
}
}
}, [runStatus, isRunCurrent, runId])

Expand Down Expand Up @@ -452,23 +464,6 @@ export function ProtocolRunHeader({
isRunCurrent={isRunCurrent}
/>
) : null}
{mostRecentRunId === runId && showDropTipBanner && areTipsAttached ? (
<ProtocolDropTipBanner
onLaunchWizardClick={toggleDTWiz}
onCloseClick={() => {
resetTipStatus()
setShowDropTipBanner(false)
closeCurrentRun({
onSuccess: () => {
if (isQuickTransfer) {
deleteRun(runId)
navigate(`/devices/${robotName}`)
}
},
})
}}
/>
) : null}
{showDTModal ? (
<ProtocolDropTipModal
onSkip={onDTModalSkip}
Expand Down Expand Up @@ -561,7 +556,14 @@ export function ProtocolRunHeader({
} else {
void setTipStatusResolved(() => {
toggleDTWiz()
closeCurrentRun()
closeCurrentRun({
onSuccess: () => {
if (isQuickTransfer) {
deleteRun(runId)
navigate(`/devices/${robotName}`)
}
},
})
}, toggleDTWiz)
}
}}
Expand Down

0 comments on commit 8054593

Please sign in to comment.