lbry-desktop/web/component/footer.jsx

57 lines
1.8 KiB
React
Raw Normal View History

import React, { useEffect } from 'react';
2020-05-08 18:48:58 +02:00
import Button from 'component/button';
2021-07-23 22:18:28 +02:00
import { SIMPLE_SITE } from 'config';
2020-05-08 18:48:58 +02:00
export default function Footer() {
useEffect(() => {
const maxTimeout = 2000;
let elapsedTime = 0;
function checkForOneTrust() {
elapsedTime = elapsedTime + 500;
if (elapsedTime > maxTimeout) return;
if (!window.Optanon) {
window.setTimeout(checkForOneTrust, 500);
} else {
const privacyFooterButton = document.getElementById('gdprPrivacyFooter');
if (privacyFooterButton) privacyFooterButton.style.display = 'block';
}
}
checkForOneTrust();
}, []);
2021-07-23 22:18:28 +02:00
if (!SIMPLE_SITE) {
return null;
}
2020-05-08 18:48:58 +02:00
return (
<footer className="footer">
2021-07-23 22:18:28 +02:00
<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">
2021-10-08 21:22:03 +02:00
<Button
label={__('Support --[used in footer; general help/support]--')}
href="https://odysee.com/@OdyseeHelp:b"
/>
2021-07-23 22:18:28 +02:00
</li>
<li className="footer__link">
2021-10-08 21:22:03 +02:00
<Button label={__('Terms')} href="https://odysee.com/$/tos" />
2021-07-23 22:18:28 +02:00
</li>
<li className="footer__link">
<Button label={__('Privacy Policy')} href="https://odysee.com/$/privacypolicy" />
</li>
<li className="footer__link" id="gdprPrivacyFooter">
2021-12-13 21:13:50 +01:00
<Button label={__('Cookie Settings')} onClick={() => window.Optanon && window.Optanon.ToggleInfoDisplay()} />
2021-07-23 22:18:28 +02:00
</li>
</ul>
2020-05-08 18:48:58 +02:00
</footer>
);
}