import { useEffect } from 'react'
import { Gradient } from '../Gradient.js'


export const GradientBG = () =>{
    useEffect(() => {
        // Call `initGradient` with the selector to your canvas
        const canvasElement = document.getElementById("gradient-background");
        const gradient: any = new Gradient();
        if (canvasElement) {
            gradient.initGradient("#gradient-background");
        } else {
            gradient.pause();
        }
    }, []);

    return (
        <canvas className='-z-40 w-screen h-screen fixed top-0 left-0'  id="gradient-background" data-transition-in />
    );
};

        