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

30 lines
633 B
TypeScript
Raw Normal View History

2024-02-19 08:39:35 +00:00
import { useEffect } from 'react';
const InstagramWidget = () => {
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="546492f9901c893c2495edfa29649697fc0addd8"></div>
);
};
export default InstagramWidget;