lbry-desktop/web/component/footer.jsx
mayeaux f2715fa97b
Adds GDPR support (#311)
* add gdpr support

* only run on production

* testing implementation

* just needs last touches then ready

* ready for merge

* add cookies to sidebar

* hide button when secureprivacy not available

* switch over to loading script as a react hook

* conditionally add secureprivacy script

* save gdpr status on session

* better design
2021-11-23 10:21:33 -05:00

42 lines
1.4 KiB
JavaScript

import React, { useEffect } from 'react';
import Button from 'component/button';
import { SIMPLE_SITE } from 'config';
export default function Footer() {
useEffect(() => {
if (!window.sp) {
document.getElementById('gdprPrivacyFooter').style.display = 'none';
}
}, []);
if (!SIMPLE_SITE) {
return null;
}
return (
<footer className="footer">
<ul className="navigation__tertiary footer__links">
<li className="footer__link">
<Button label={__('Community Guidelines')} href="https://odysee.com/@OdyseeHelp:b/Community-Guidelines:c" />
</li>
<li className="footer__link">
<Button label={__('FAQ')} href="https://odysee.com/@OdyseeHelp:b" />
</li>
<li className="footer__link">
<Button
label={__('Support --[used in footer; general help/support]--')}
href="https://odysee.com/@OdyseeHelp:b"
/>
</li>
<li className="footer__link">
<Button label={__('Terms')} href="https://odysee.com/$/tos" />
</li>
<li className="footer__link">
<Button label={__('Privacy Policy')} href="https://odysee.com/$/privacypolicy" />
</li>
<li className="footer__link" id="gdprPrivacyFooter">
<Button label={__('Cookies')} onClick={() => window.sp && window.sp.showPrivacyBanner()} />
</li>
</ul>
</footer>
);
}