43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
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="7501cb8270327e936909c6ed57298ead0c5c07d0"
|
|
// ></div>
|
|
<iframe
|
|
name="f3d8479283c8374"
|
|
width="1080px"
|
|
height="480px"
|
|
data-testid="fb:page Facebook Social Plugin"
|
|
title="fb:page Facebook Social Plugin"
|
|
scrolling="no"
|
|
allow="encrypted-media"
|
|
src="https://web.facebook.com/v12.0/plugins/page.php?adapt_container_width=true&app_id=664876294862028&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df23357a43cf8c%26domain%3Dhumas.polri.go.id%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fhumas.polri.go.id%252Ff29b91925fa28f%26relation%3Dparent.parent&container_width=280&height=2080&hide_cover=true&href=https%3A%2F%2Fwww.facebook.com%2FDivHumasPolri&locale=id_ID&sdk=joey&show_facepile=false&small_header=false&tabs=timeline&width=280"
|
|
style={{
|
|
border: "none",
|
|
visibility: "visible",
|
|
width: "100%",
|
|
height: "588px",
|
|
borderRadius: "15px",
|
|
}}
|
|
></iframe>
|
|
);
|
|
};
|
|
|
|
export default FacebookWidget;
|