fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-02-08 17:58:06 +01:00
parent ad99601407
commit ff8536f8c6

View File

@@ -3,12 +3,15 @@ import { Gradient } from '../Gradient.js'
export const GradientBG = () =>{ export const GradientBG = () =>{
// Create your instance
const gradient = new Gradient();
useEffect(() => { useEffect(() => {
// Call `initGradient` with the selector to your canvas // Call `initGradient` with the selector to your canvas
gradient.initGradient('#gradient-background') const canvasElement = document.getElementById("gradient-background");
const gradient: any = new Gradient();
if (canvasElement) {
gradient.initGradient("#gradient-background");
} else {
gradient.pause();
}
}, []); }, []);
return ( return (