2021-11-23 16:21:33 +01:00
|
|
|
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() {
|
2021-11-23 16:21:33 +01:00
|
|
|
useEffect(() => {
|
2021-12-14 20:40:27 +01:00
|
|
|
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';
|
|
|
|
}
|
2021-11-23 16:21:33 +01:00
|
|
|
}
|
2021-12-14 20:40:27 +01:00
|
|
|
|
|
|
|
checkForOneTrust();
|
2021-11-23 16:21:33 +01:00
|
|
|
}, []);
|
|
|
|
|
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">
|
2021-11-24 21:25:22 +01:00
|
|
|
<Button label={__('Privacy Policy')} href="https://odysee.com/$/privacypolicy" />
|
2021-11-23 16:21:33 +01:00
|
|
|
</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>
|
2021-06-07 19:18:52 +02:00
|
|
|
</ul>
|
2020-05-08 18:48:58 +02:00
|
|
|
</footer>
|
|
|
|
);
|
|
|
|
}
|