Skip to content

Commit

Permalink
fix(app): liquid state needs analysis (#16212)
Browse files Browse the repository at this point in the history
We were defaulting the liquids-confirmed state to true if there weren't
any liquids, but we can only know there aren't any liquids if we've
actually received an analysis that says that - until then, we shouldn't
show anything at all. Make the liquids-confirmed state always be false
until we get an analysis, and only _then_ set it to true if we don't
have any.

Closes RQA-3157
  • Loading branch information
sfoster1 authored Sep 9, 2024
1 parent a1bab54 commit 904b1ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/organisms/Devices/ProtocolRun/ProtocolRunSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,13 @@ export function ProtocolRunSetup({
setLabwareSetupComplete,
] = React.useState<boolean>(false)
const [liquidSetupComplete, setLiquidSetupComplete] = React.useState<boolean>(
!hasLiquids
false
)
React.useEffect(() => {
if ((robotProtocolAnalysis || storedProtocolAnalysis) && !hasLiquids) {
setLiquidSetupComplete(true)
}
}, [robotProtocolAnalysis, storedProtocolAnalysis, hasLiquids])
if (
!hasLiquids &&
protocolAnalysis != null &&
Expand Down

0 comments on commit 904b1ef

Please sign in to comment.