diff --git a/src/components/Viewer/Player/AudioVisualizer.tsx b/src/components/Viewer/Player/AudioVisualizer.tsx index aade178f..652f9eaa 100644 --- a/src/components/Viewer/Player/AudioVisualizer.tsx +++ b/src/components/Viewer/Player/AudioVisualizer.tsx @@ -1,76 +1,85 @@ /* eslint-disable react/display-name */ +import React, { useCallback } from "react"; + import { AudioVisualizerWrapper } from "src/components/Viewer/Player/AudioVisualizer.styled"; -import React from "react"; - -const AudioVisualizer = React.forwardRef((_props, ref: any) => { - const canvasRef = React.useRef(null); - - React.useEffect(() => { - if (!ref) return; - // Add a callback fn to the `