refactor: use application error alert in mermaid-chart

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-08-06 13:05:46 +02:00
parent 2c4d688abd
commit 9cf450a622

View file

@ -9,9 +9,9 @@ import { cypressId } from '../../../utils/cypress-attribute'
import { Logger } from '../../../utils/logger'
import styles from './mermaid.module.scss'
import React, { Fragment, useRef } from 'react'
import { Alert } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import { useAsync } from 'react-use'
import { ApplicationErrorAlert } from '../../../components/common/application-error-alert/application-error-alert'
const log = new Logger('MermaidChart')
@ -66,7 +66,7 @@ export const MermaidChart: React.FC<CodeProps> = ({ code }) => {
return (
<Fragment>
<ShowIf condition={!!error}>
<Alert variant={'warning'}>{error?.message}</Alert>
<ApplicationErrorAlert className={'text-wrap'}>{error?.message}</ApplicationErrorAlert>
</ShowIf>
<div
{...cypressId('mermaid-frame')}