diff --git a/packages/pl-fe/src/components/gdpr-banner.tsx b/packages/pl-fe/src/components/gdpr-banner.tsx deleted file mode 100644 index 0f86c8e2d..000000000 --- a/packages/pl-fe/src/components/gdpr-banner.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import clsx from 'clsx'; -import React, { useState } from 'react'; -import { FormattedMessage } from 'react-intl'; - -import Banner from 'pl-fe/components/ui/banner'; -import Button from 'pl-fe/components/ui/button'; -import HStack from 'pl-fe/components/ui/hstack'; -import Stack from 'pl-fe/components/ui/stack'; -import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/use-instance'; -import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; - -const acceptedGdpr = !!localStorage.getItem('plfe:gdpr'); - -/** Displays a cookie consent banner. */ -const GdprBanner: React.FC = () => { - /** Track whether the banner has already been displayed once. */ - const [shown, setShown] = useState(acceptedGdpr); - const [slideout, setSlideout] = useState(false); - - const instance = useInstance(); - const { gdprUrl } = usePlFeConfig(); - - const handleAccept = () => { - localStorage.setItem('plfe:gdpr', 'true'); - setSlideout(true); - setTimeout(() => setShown(true), 200); - }; - - if (shown) { - return null; - } - - return ( - -
- - - - - - - - - - - - {gdprUrl && ( - - - - )} - - - -
-
- ); -}; - -export { GdprBanner as default }; diff --git a/packages/pl-fe/src/init/pl-fe-mount.tsx b/packages/pl-fe/src/init/pl-fe-mount.tsx index ff26f55ab..2c8ee8263 100644 --- a/packages/pl-fe/src/init/pl-fe-mount.tsx +++ b/packages/pl-fe/src/init/pl-fe-mount.tsx @@ -13,7 +13,6 @@ import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { useCachedLocationHandler } from 'pl-fe/utils/redirect'; -const GdprBanner = React.lazy(() => import('pl-fe/components/gdpr-banner')); const EmbeddedStatus = React.lazy(() => import('pl-fe/features/embedded-status')); const UI = React.lazy(() => import('pl-fe/features/ui')); @@ -24,7 +23,7 @@ const PlFeMount = () => { const { isLoggedIn } = useLoggedIn(); const plFeConfig = usePlFeConfig(); - const { redirectRootNoLogin, gdpr } = plFeConfig; + const { redirectRootNoLogin } = plFeConfig; // @ts-ignore: I don't actually know what these should be, lol const shouldUpdateScroll = (prevRouterProps, { location }) => @@ -61,12 +60,6 @@ const PlFeMount = () => { - {(gdpr && !isLoggedIn) && ( - - - - )} -