26 lines
577 B
TypeScript
26 lines
577 B
TypeScript
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="7ad1e18598045d000abbf6de3479b1bbd5502583"
|
|
></div>
|
|
);
|
|
};
|
|
|
|
export default FacebookWidget;
|