web-humas-fe/components/SocialMedia/Twitter.tsx

30 lines
629 B
TypeScript
Raw Normal View History

2024-02-23 12:34:32 +00:00
import { useEffect } from 'react';
const TwitterWidget = () => {
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="c4857612a0e86456294a1a38046d17fc1040c003"></div>
);
};
export default TwitterWidget;