mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 17:26:29 -05:00
fix: remove redundant effect dependency
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
eb850a600c
commit
3b2054532c
1 changed files with 1 additions and 4 deletions
|
@ -8,7 +8,6 @@ import { ShowIf } from '../../../components/common/show-if/show-if'
|
|||
import type { CodeProps } from '../../../components/markdown-renderer/replace-components/code-block-component-replacer'
|
||||
import { cypressId } from '../../../utils/cypress-attribute'
|
||||
import { Logger } from '../../../utils/logger'
|
||||
import { useRouter } from 'next/router'
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import { Alert } from 'react-bootstrap'
|
||||
import { useAsync } from 'react-use'
|
||||
|
@ -24,8 +23,6 @@ export const GraphvizFrame: React.FC<CodeProps> = ({ code }) => {
|
|||
const container = useRef<HTMLDivElement>(null)
|
||||
const [error, setError] = useState<string>()
|
||||
|
||||
const { basePath } = useRouter()
|
||||
|
||||
const {
|
||||
value: graphvizImport,
|
||||
error: libLoadingError,
|
||||
|
@ -58,7 +55,7 @@ export const GraphvizFrame: React.FC<CodeProps> = ({ code }) => {
|
|||
} catch (error) {
|
||||
showError(error as string)
|
||||
}
|
||||
}, [code, basePath, showError, graphvizImport])
|
||||
}, [code, showError, graphvizImport])
|
||||
|
||||
return (
|
||||
<AsyncLoadingBoundary loading={isLibLoading || !graphvizImport} componentName={'graphviz'} error={libLoadingError}>
|
||||
|
|
Loading…
Reference in a new issue