import { useEffect } from "react";

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

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

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

export default PolriTvWidget;
