"use client";
import { useEffect } from "react";

const LoadScript = () => {
  useEffect(() => {
    const script = document.createElement("script");
    script.src = "https://cdn.userway.org/widget.js";
    script.setAttribute("data-account", "X36s1DpjqB");
    script.async = true;

    document.head.appendChild(script);

    return () => {
      // Cleanup if needed
      document.head.removeChild(script);
    };
  }, []);

  return null; // Tidak perlu merender apa-apa
};

export default LoadScript;
