tiktok React
Tue Aug 08 2023 17:21:34 GMT+0000 (Coordinated Universal Time)
Saved by
@bfpulliam
#react.js
const TikTok = () => {
useEffect(() => {
const anchor = document.createElement("a");
anchor.setAttribute("class", "twitter-timeline");
anchor.setAttribute("data-theme", "dark");
anchor.setAttribute("data-tweet-limit", "5");
anchor.setAttribute("data-chrome", "noheader nofooter noborders");
anchor.setAttribute("href", "https://www.tiktok.com/@leecosheriffal");
document.getElementsByClassName("twitter-embed")[0].appendChild(anchor);
const script = document.createElement("script");
script.setAttribute("src", "https://www.tiktok.com/embed.js");
document.getElementsByClassName("twitter-embed")[0].appendChild(script);
}, []);
return (
<section className="twitterContainer">
<div className="twitter-embed"></div>
</section>
);
};
export default TikTok;
content_copyCOPY
Comments