mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
Remove custom abcjs types (#1024)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
47f5e7653b
commit
8a2d26f718
2 changed files with 7 additions and 15 deletions
|
@ -19,12 +19,13 @@ export const AbcFrame: React.FC<AbcFrameProps> = ({ code }) => {
|
|||
return
|
||||
}
|
||||
const actualContainer = container.current
|
||||
import(/* webpackChunkName: "abc.js" */ 'abcjs').then((imp) => {
|
||||
imp.renderAbc(actualContainer, code)
|
||||
})
|
||||
.catch(() => {
|
||||
console.error('error while loading abcjs')
|
||||
})
|
||||
import(/* webpackChunkName: "abc.js" */ 'abcjs')
|
||||
.then((imp) => {
|
||||
imp.renderAbc(actualContainer, code, {})
|
||||
})
|
||||
.catch(() => {
|
||||
console.error('error while loading abcjs')
|
||||
})
|
||||
}, [code])
|
||||
|
||||
return <div ref={ container } className={ 'abcjs-score bg-white text-black text-center overflow-x-auto' }/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue