Skip to content

feat: add cookie consent banner for privacy compliance#1025

Merged
JuanPabloDiaz merged 1 commit intotech-conferences:mainfrom
JuanPabloDiaz:feat/cookie-consent-banner
Jul 9, 2025
Merged

feat: add cookie consent banner for privacy compliance#1025
JuanPabloDiaz merged 1 commit intotech-conferences:mainfrom
JuanPabloDiaz:feat/cookie-consent-banner

Conversation

@JuanPabloDiaz
Copy link
Contributor

Cookie Consent Banner Implementation

This PR adds GDPR-compliant cookie consent functionality to improve privacy compliance.

  • Add CookieConsent component with accept/decline functionality
  • Store user preferences in localStorage
  • Responsive design with proper ARIA attributes for accessibility
  • Dark mode compatible styling
  • Integrate banner into main App component
  • Export component through components index

breaking down #1021


This pull request introduces a new CookieConsent component to handle user consent for cookies and third-party services, along with its integration into the app. The changes include the creation of the component, its styling, and the addition of the consent banner to the main application layout.

New CookieConsent Component:

  • Component Implementation: Added the CookieConsent component in src/components/CookieConsent/CookieConsent.tsx, which displays a banner for users to accept or decline cookies. It uses localStorage to store consent status and dynamically handles third-party services like Twitter widgets based on user choice.
  • Styling: Created CookieConsent.module.scss to style the banner, ensuring responsiveness and theme compatibility for both light and dark modes. Includes styles for buttons and layout adjustments for smaller screens.

Integration into Application:

  • App Layout Update: Integrated the CookieConsent component into the main application layout by importing it in src/components/App/App.tsx and adding it to the rendered output. [1] [2]

Component Export and Index Updates:

  • Component Export: Added an index file in src/components/CookieConsent for default export of the CookieConsent component.
  • Global Index Update: Updated src/components/index.ts to include CookieConsent in the global exports for easier access throughout the codebase.

- Add CookieConsent component with accept/decline functionality
- Store user preferences in localStorage
- Responsive design with proper ARIA attributes for accessibility
- Dark mode compatible styling
- Integrate banner into main App component
- Export component through components index
@JuanPabloDiaz JuanPabloDiaz merged commit 4b851ee into tech-conferences:main Jul 9, 2025
4 checks passed
@JuanPabloDiaz JuanPabloDiaz deleted the feat/cookie-consent-banner branch July 9, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant