diff --git a/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx b/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx index 5684b123afb..b6b60315936 100644 --- a/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx +++ b/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { useEffect, useState } from 'react' import { useDropTipLocations, @@ -64,6 +64,14 @@ export function DropTipWizardFlows( const dropTipRoutingUtils = useDropTipRouting(fixitCommandTypeUtils) const dropTipCommandLocations = useDropTipLocations(props.robotType) // Prefetch to reduce client latency + // If the flow unrenders for any reason (ex, the pipette card managing the flow unrenders), don't re-render the flow + // after it closes. + useEffect(() => { + return () => { + dropTipWithTypeUtils.dropTipCommands.handleCleanUpAndClose() + } + }, []) + return (