\n \n \n \n \n
\n \n )\n}\n\nconst CookiesBanner = styled.div`\n animation: ${props => props.animation} 1s;\n opacity: ${props => props.opacity};\n display: flex;\n position: fixed;\n z-index: 30;\n width: 100%;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n background-color: ${color.costaRed};\n color: ${color.white};\n font-size: 16px;\n font-family: Helvetica, Calibri, Arial, sans-serif;\n line-height: 24px;\n padding: 16px 29px;\n\n ${above.mobile`\n flex-direction: row;\n flex-wrap: nowrap;\n `}\n\n span a {\n text-decoration: underline;\n opacity: 0.8;\n padding: 3px;\n :hover {\n opacity: 1;\n }\n }\n\n > div {\n padding-top: 16px;\n display: flex;\n flex-wrap: no-wrap;\n\n ${above.mobile`\n padding-top: 0;\n `}\n }\n\n p {\n margin: 0;\n ${bodyTwo}\n }\n\n a {\n text-decoration: underline;\n color: ${color.white};\n opacity: 0.8;\n }\n\n button {\n animation: ${buttonFadeIn} 0.5s;\n color: ${color.white};\n border-style: none;\n height: 40px;\n text-align: center;\n background-color: ${color.lightRed};\n width: 140px;\n padding: 8px 12px;\n font-weight: 700;\n font-family: proxima-nova, sans-serif;\n font-size: 14px;\n\n margin-left: 7px;\n\n :hover {\n cursor: pointer;\n animation: ${buttonFadeOut} 0.5s;\n background-color: transparent;\n text-decoration: underline;\n }\n\n :focus {\n animation: ${buttonFadeOut} 0.5s;\n background-color: transparent;\n }\n }\n`\n\nexport default ConsentBanner\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useState, useEffect } from 'react'\nimport cookie from '../../helpers/cookie'\nimport ConsentBanner from './consentBanner'\n\nconst ConsentBannerWrapper = ({ setAllowTracking, locale }) => {\n const [showBanner, setShowBanner] = useState(false)\n\n useEffect(() => {\n setShowBanner(!cookie.hasChosenCookieSettings())\n\n if (cookie.areCookiesAllowed()) {\n setAllowTracking(true)\n window[`ga-disable-${process.env.GATSBY_GA_UA}`] = false\n } else {\n window[`ga-disable-${process.env.GATSBY_GA_UA}`] = true\n window._satellite = {\n track: () => {},\n pageBottom: () => {},\n }\n }\n }, [showBanner])\n\n return showBanner &&