From 904b1ef51fc6f0259d4dbcace9a1d685c30d0542 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Mon, 9 Sep 2024 09:15:27 -0400 Subject: [PATCH] fix(app): liquid state needs analysis (#16212) 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 --- app/src/organisms/Devices/ProtocolRun/ProtocolRunSetup.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunSetup.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunSetup.tsx index eda53b261f0..5961bb67d96 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunSetup.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunSetup.tsx @@ -184,8 +184,13 @@ export function ProtocolRunSetup({ setLabwareSetupComplete, ] = React.useState(false) const [liquidSetupComplete, setLiquidSetupComplete] = React.useState( - !hasLiquids + false ) + React.useEffect(() => { + if ((robotProtocolAnalysis || storedProtocolAnalysis) && !hasLiquids) { + setLiquidSetupComplete(true) + } + }, [robotProtocolAnalysis, storedProtocolAnalysis, hasLiquids]) if ( !hasLiquids && protocolAnalysis != null &&