mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
refactor: use application error alert in mermaid-chart
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
2c4d688abd
commit
9cf450a622
1 changed files with 2 additions and 2 deletions
|
@ -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')}
|
||||
|
|
Loading…
Reference in a new issue