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

30 lines
629 B
TypeScript

import { useEffect } from 'react';
const YoutubeWidget = () => {
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 YoutubeWidget;