import { useEffect } from "react";

const FacebookWidget = () => {
  useEffect(() => {
    if (typeof window !== "undefined") {
      const script = document.createElement("script");
      script.src = "https://embedsocial.com/cdn/ht.js";
      script.async = true;
      document.head.appendChild(script);

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

  return (
    <div
      className="embedsocial-hashtag rounded-md"
      data-ref="7501cb8270327e936909c6ed57298ead0c5c07d0"
    ></div>
  );
};

export default FacebookWidget;
