diff --git a/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx b/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx index 55193ca1b91..cc011792d9c 100644 --- a/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx +++ b/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx @@ -27,9 +27,11 @@ const SUPPORT_EMAIL = 'support@opentrons.com' interface FatalErrorModalProps { errorMessage: string + shouldUseMetalProbe: boolean onClose: () => void } export function FatalErrorModal(props: FatalErrorModalProps): JSX.Element { + const { errorMessage, shouldUseMetalProbe, onClose } = props const { t } = useTranslation(['labware_position_check', 'shared']) return ( @@ -38,7 +40,7 @@ export function FatalErrorModal(props: FatalErrorModalProps): JSX.Element { header={ } > @@ -58,6 +60,15 @@ export function FatalErrorModal(props: FatalErrorModalProps): JSX.Element { {i18n.format(t('shared:something_went_wrong'), 'sentenceCase')} + {shouldUseMetalProbe ? ( + + {t('remove_probe_before_exit')} + + ) : null} {t('shared:help_us_improve_send_error_report', { support_email: SUPPORT_EMAIL, @@ -65,13 +76,13 @@ export function FatalErrorModal(props: FatalErrorModalProps): JSX.Element { {t('shared:exit')} diff --git a/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx b/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx index d06c38dd189..530a4952bc2 100644 --- a/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx +++ b/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx @@ -334,6 +334,7 @@ export const LabwarePositionCheckComponent = ( modalContent = ( ) diff --git a/app/src/organisms/LabwarePositionCheck/index.tsx b/app/src/organisms/LabwarePositionCheck/index.tsx index 44e2da2b5c4..34e0c809c12 100644 --- a/app/src/organisms/LabwarePositionCheck/index.tsx +++ b/app/src/organisms/LabwarePositionCheck/index.tsx @@ -3,8 +3,9 @@ import { useLogger } from '../../logger' import { LabwarePositionCheckComponent } from './LabwarePositionCheckComponent' import { FatalErrorModal } from './FatalErrorModal' -import type { +import { CompletedProtocolAnalysis, + FLEX_ROBOT_TYPE, RobotType, } from '@opentrons/shared-data' import type { LabwareOffset } from '@opentrons/api-client' @@ -34,6 +35,7 @@ export const LabwarePositionCheck = ( @@ -44,9 +46,11 @@ export const LabwarePositionCheck = ( interface ErrorBoundaryProps { children: React.ReactNode onClose: () => void + shouldUseMetalProbe: boolean logger: ReturnType ErrorComponent: (props: { errorMessage: string + shouldUseMetalProbe: boolean onClose: () => void }) => JSX.Element } @@ -70,12 +74,13 @@ class ErrorBoundary extends React.Component< } render(): ErrorBoundaryProps['children'] | JSX.Element { - const { ErrorComponent, children } = this.props + const { ErrorComponent, children, shouldUseMetalProbe } = this.props const { error } = this.state if (error != null) return ( )