mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04: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 { Logger } from '../../../utils/logger'
|
||||||
import styles from './mermaid.module.scss'
|
import styles from './mermaid.module.scss'
|
||||||
import React, { Fragment, useRef } from 'react'
|
import React, { Fragment, useRef } from 'react'
|
||||||
import { Alert } from 'react-bootstrap'
|
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useAsync } from 'react-use'
|
import { useAsync } from 'react-use'
|
||||||
|
import { ApplicationErrorAlert } from '../../../components/common/application-error-alert/application-error-alert'
|
||||||
|
|
||||||
const log = new Logger('MermaidChart')
|
const log = new Logger('MermaidChart')
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ export const MermaidChart: React.FC<CodeProps> = ({ code }) => {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<ShowIf condition={!!error}>
|
<ShowIf condition={!!error}>
|
||||||
<Alert variant={'warning'}>{error?.message}</Alert>
|
<ApplicationErrorAlert className={'text-wrap'}>{error?.message}</ApplicationErrorAlert>
|
||||||
</ShowIf>
|
</ShowIf>
|
||||||
<div
|
<div
|
||||||
{...cypressId('mermaid-frame')}
|
{...cypressId('mermaid-frame')}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue