Created
February 28, 2020 18:21
-
-
Save cwardzala/3850e3a0d1eb869f76f12d522c61c6fd to your computer and use it in GitHub Desktop.
React component to embed Iubenda privacy policy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Iubenda = ({ | |
policyId | |
}) => { | |
useEffect(() => { | |
var s = document.createElement("script"); | |
let tag = document.getElementsByTagName("script")[0]; | |
s.src="https://cdn.iubenda.com/iubenda.js"; | |
tag.parentNode.insertBefore(s,tag); | |
}, []); | |
return <a href={`https://www.iubenda.com/privacy-policy/${policyId}`} class="iubenda-white iubenda-embed" title="Privacy Policy ">Privacy Policy</a> | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment