-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app): add remove probe prompt when LPC errors (#14574)
fix RQA-2342
- Loading branch information
Showing
3 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,11 @@ const SUPPORT_EMAIL = '[email protected]' | |
|
||
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 ( | ||
<Portal level="top"> | ||
|
@@ -38,7 +40,7 @@ export function FatalErrorModal(props: FatalErrorModalProps): JSX.Element { | |
header={ | ||
<WizardHeader | ||
title={t('labware_position_check_title')} | ||
onExit={props.onClose} | ||
onExit={onClose} | ||
/> | ||
} | ||
> | ||
|
@@ -58,20 +60,29 @@ export function FatalErrorModal(props: FatalErrorModalProps): JSX.Element { | |
<ErrorHeader> | ||
{i18n.format(t('shared:something_went_wrong'), 'sentenceCase')} | ||
</ErrorHeader> | ||
{shouldUseMetalProbe ? ( | ||
<StyledText | ||
as="p" | ||
fontWeight={TYPOGRAPHY.fontWeightSemiBold} | ||
textAlign={TEXT_ALIGN_CENTER} | ||
> | ||
{t('remove_probe_before_exit')} | ||
</StyledText> | ||
) : null} | ||
<StyledText as="p" textAlign={TEXT_ALIGN_CENTER}> | ||
{t('shared:help_us_improve_send_error_report', { | ||
support_email: SUPPORT_EMAIL, | ||
})} | ||
</StyledText> | ||
<ErrorTextArea | ||
readOnly | ||
value={props.errorMessage ?? ''} | ||
value={errorMessage ?? ''} | ||
spellCheck={false} | ||
/> | ||
<PrimaryButton | ||
textTransform={TEXT_TRANSFORM_CAPITALIZE} | ||
alignSelf={ALIGN_FLEX_END} | ||
onClick={props.onClose} | ||
onClick={onClose} | ||
> | ||
{t('shared:exit')} | ||
</PrimaryButton> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters