Skip to content

Commit

Permalink
chore: simplify button
Browse files Browse the repository at this point in the history
  • Loading branch information
virus-rpi committed Nov 21, 2024
1 parent 424299e commit a0e7442
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/pages/data-privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Layout } from '../components/layout/layout';
import { ContentBlockContainer } from '../components/layout/content-block-container';
import { ContentfulRichText } from '../components/content/rich-text/rich-text';
import { ContentfulPage, ContentfulRichTextType } from '../types';
import * as CookieConsentLib from 'vanilla-cookieconsent';
import { Button } from '../components/ui/buttons/button';
import { useTranslation } from 'react-i18next';

Expand All @@ -18,17 +17,10 @@ const DataPrivacyPage = ({
data,
}: PageProps<DataPrivacyPageQueryProps>): JSX.Element => {
const { t } = useTranslation();

const reopenCookieConsent = () => {
if (CookieConsentLib && CookieConsentLib.showPreferences) {
CookieConsentLib.showPreferences();
}
};

return (
<Layout light={true}>
<ContentBlockContainer>
<Button onClick={reopenCookieConsent}>
<Button type="button" data-cc="show-preferencesModal">
{t('dataprivacy.reopen-cookie-consent')}
</Button>
<ContentfulRichText
Expand Down

0 comments on commit a0e7442

Please sign in to comment.