fix(cava): high memory usage

This commit is contained in:
2024-07-25 13:06:01 +02:00
parent c1527377af
commit 2ac5416e86

View File

@@ -131,7 +131,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
return () => { return () => {
if (requestRef.current) cancelAnimationFrame(requestRef.current); if (requestRef.current) cancelAnimationFrame(requestRef.current);
}; };
}, [props.cols, props.audio, calculateBarHeights]); }, [props.cols, props.audio]);
return barHeights.map((value, i) => ( return barHeights.map((value, i) => (
<FrequencyBar key={i} value={value} max={255 / 2} height={props.rows} /> <FrequencyBar key={i} value={value} max={255 / 2} height={props.rows} />