mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
refactor: use application error alert in abc-frame
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
cb38d5dedf
commit
cdd368bc81
1 changed files with 2 additions and 5 deletions
|
@ -12,9 +12,8 @@ import { cypressId } from '../../../utils/cypress-attribute'
|
|||
import { Logger } from '../../../utils/logger'
|
||||
import styles from './abc.module.scss'
|
||||
import React, { useRef } from 'react'
|
||||
import { Alert } from 'react-bootstrap'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useAsync } from 'react-use'
|
||||
import { TranslatedApplicationErrorAlert } from '../../../components/common/application-error-alert/translated-application-error-alert'
|
||||
|
||||
const log = new Logger('AbcFrame')
|
||||
|
||||
|
@ -51,9 +50,7 @@ export const AbcFrame: React.FC<CodeProps> = ({ code }) => {
|
|||
return (
|
||||
<AsyncLoadingBoundary loading={loading || !abcLib} error={!!loadingError} componentName={'abc.js'}>
|
||||
<ShowIf condition={!!renderError}>
|
||||
<Alert variant={'danger'}>
|
||||
<Trans i18nKey={'editor.embeddings.abcJs.errorWhileRendering'} />
|
||||
</Alert>
|
||||
<TranslatedApplicationErrorAlert errorI18nKey={'editor.embeddings.abcJs.errorWhileRendering'} />
|
||||
</ShowIf>
|
||||
<div
|
||||
ref={container}
|
||||
|
|
Loading…
Reference in a new issue