diff --git a/package.json b/package.json index 7151bec..31d5620 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "react-helmet": "^6.1.0", "react-html-parser": "^2.0.2", "react-lazyload": "^3.2.0", + "react-load-script": "^0.0.6", "react-responsive-carousel": "^3.2.18" }, "presets": [ diff --git a/src/Content/FacebookPage/index.js b/src/Content/FacebookPage/index.js new file mode 100644 index 0000000..7c84907 --- /dev/null +++ b/src/Content/FacebookPage/index.js @@ -0,0 +1,44 @@ +import React, { useState, useEffect, Fragment } from 'react'; +import Script from 'react-load-script'; + +const FacebookPage = props => { + const [scriptLoaded, setScriptLoaded] = useState(false); + + const { pageURL } = props.item.dataParsed; + + console.log(pageURL); + + useEffect(() => { + if (window.FB) { + window.FB.XFBML.parse(); + } + }, []); + + return ( + <> +