From db93ff6e1dd15b757e94a6cff843d7b4aea06725 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Sun, 1 Feb 2026 15:17:05 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(privacy):=20updat?= =?UTF-8?q?e=20privacy=20policy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit temporarily disable cookies --- .../molecules/CookiePreferences/index.tsx | 132 +----------------- src/components/molecules/Footer/index.tsx | 5 +- .../molecules/PrivacyPolicy/index.tsx | 116 +++++++-------- .../templates/RouteTracker/index.tsx | 6 - src/main.tsx | 12 +- 5 files changed, 62 insertions(+), 209 deletions(-) diff --git a/src/components/molecules/CookiePreferences/index.tsx b/src/components/molecules/CookiePreferences/index.tsx index 2cd70bf..ea9cdba 100644 --- a/src/components/molecules/CookiePreferences/index.tsx +++ b/src/components/molecules/CookiePreferences/index.tsx @@ -1,141 +1,23 @@ import React from 'react' -import { useState, useEffect, useCallback } from 'react' -import { Box, Button, Link, Stack, Switch, Typography, SnackbarCloseReason, Snackbar, Alert } from '@mui/material' -import { useAnalytics } from 'use-analytics' +import { Box, Typography } from '@mui/material' -import { ANALYTICS_PLUGINS, COOKIE_CONSENT_KEY } from 'components/utils/analytics/index.js' import { SectionHeader } from 'components/atoms/index.js' -interface CookieConsentState { - necessary: boolean // Always true, but included for completeness - analytics: boolean -} - export type CookieConsentProps = { consentDisplayDefaultOpen?: boolean } -const CookieConsent: React.FC = ({ consentDisplayDefaultOpen = true }) => { - const analytics = useAnalytics() - const [consent, setConsent] = useState({ - necessary: true, - analytics: false, - }) - const [open, setOpen] = React.useState(false) - - const handleClose = (_event: React.SyntheticEvent | Event, reason?: SnackbarCloseReason) => { - if (reason === 'clickaway') { - return - } - setOpen(false) - } - - useEffect(() => { - // Check if user has already given consent - const savedConsent = localStorage.getItem(COOKIE_CONSENT_KEY) - - if (savedConsent) { - const parsedConsent = JSON.parse(savedConsent) as CookieConsentState - // eslint-disable-next-line react-hooks/set-state-in-effect - setConsent(parsedConsent) - } - }, [analytics.plugins, consentDisplayDefaultOpen]) - - const handleSave = useCallback(() => { - localStorage.setItem(COOKIE_CONSENT_KEY, JSON.stringify(consent)) - - // Initialize GA if analytics consent was given - if (consent.analytics) { - analytics.plugins.enable(ANALYTICS_PLUGINS) - } else { - analytics.plugins.disable(ANALYTICS_PLUGINS) - } - setOpen(true) - }, [consent, analytics.plugins]) - - const handleChange = useCallback((type: keyof CookieConsentState) => { - if (type === 'necessary') { - return - } - - setConsent(prev => ({ - ...prev, - [type]: !prev[type], - })) - }, []) - +const CookieConsent: React.FC = () => { return ( - Cookie Preferences + Cookie policy - - Please set your preferences below. You can change these settings at any time in the future. -
- For more details, please see our{' '} - - Privacy Policy - - . + + + La Compagnia d'Arme del Santo Luca, con sede in via Leonello Poletti n. 16, 44122 Ferrara, Titolare del trattamento dei dati, informa gli + utenti del sito {window.location.host} di non utilizzare alcun tipo di coockie per il funzionamento di suddetto sito web. - - ({ - display: 'flex', - flexDirection: 'column', - gap: theme.spacing(2), - my: theme.spacing(2), - p: theme.spacing(4), - backgroundColor: theme.palette.background.paper, - borderRadius: theme.shape.borderRadius, - })}> - - - - - - - - - Necessary Cookies - - - - - These cookies are essential for the website to function properly and cannot be disabled. - - - - - - - Analytics Cookies - - handleChange('analytics')} - color="default" - /> - - - These cookies help us understand how visitors interact with our website, helping us improve our services. - - - - - - - - Preferences saved! - -
) } diff --git a/src/components/molecules/Footer/index.tsx b/src/components/molecules/Footer/index.tsx index 943a82a..8bab5f8 100644 --- a/src/components/molecules/Footer/index.tsx +++ b/src/components/molecules/Footer/index.tsx @@ -5,13 +5,12 @@ import PolicyIcon from '@mui/icons-material/Policy' import CookieIcon from '@mui/icons-material/Cookie' import { EmailIconLink, InstagramIconLink, FacebookIconLink } from 'components/atoms/IconLinks/index.js' -import CookieConsent from 'components/molecules/CookieConsent/index.js' type FooterProps = { showCookieConsent?: boolean } -const Footer: React.FC = ({ showCookieConsent = true }) => { +const Footer: React.FC = () => { const year = new Date().getFullYear() return ( = ({ showCookieConsent = true }) => { m-tartari - - {showCookieConsent && } ) } diff --git a/src/components/molecules/PrivacyPolicy/index.tsx b/src/components/molecules/PrivacyPolicy/index.tsx index 3ff92da..613f247 100644 --- a/src/components/molecules/PrivacyPolicy/index.tsx +++ b/src/components/molecules/PrivacyPolicy/index.tsx @@ -19,91 +19,75 @@ const PrivacyPolicy: React.FC = () => { Privacy Policy - Last updated: May 27, 2025 + Data ultimo aggiornamento: Feb. 1, 2026 Introduction - Compagnia d'Arme del Santo Luca ("we", "our", or "us") respects your privacy and is committed to protecting your personal data. This privacy - policy will inform you about how we look after your personal data when you visit our website and tell you about your privacy rights and how - the law protects you. + L'informativa è resa solo per il sito web ufficiale di la Compagnia d'Arme del Santo Luca all'indirizzo https://{window.location.host} e non + per altri siti web esterni, eventualmente consultati dall'utente tramite link. - The Data We Collect About You + Titolare del trattamento - We collect and process the following information when you visit our website: + Il Titolare del trattamento è la Compagnia d'Arme del Santo Luca, con sede legale in via Leonello Poletti n. 16, 44122 Ferrara. - - - includes internet protocol (IP) address, browser type and version, time zone setting and location, browser plug-in types and versions, - operating system and platform, and other technology on the devices you use to access this website. - - includes information about how you use our website, products, and services. - - Cookies + Responsabile Protezione Dati (DPO) - We use cookies to distinguish you from other users of our website. This helps us to provide you with a good experience when you browse our - website and also allows us to improve our site. + Il Titolare, la Compagnia d'Arme del Santo Luca, ai sensi dell'art. 37 GDPR, non è tenuto a nominare il Responsabile della protezione dei + dati. + + + Tipi di dati trattati (Dati di navigazione) + + I sistemi informatici e le procedure software preposte al funzionamento di questo sito web acquisiscono, nel corso del loro normale esercizio, + alcuni dati personali la cui trasmissione è implicita nell'uso dei protocolli di comunicazione di Internet. Si tratta di informazioni che non + sono raccolte per essere associate a interessati identificati, ma che per loro stessa natura potrebbero, attraverso elaborazioni ed + associazioni con dati detenuti da terzi, permettere di identificare gli utenti. In questa categoria di dati rientrano gli indirizzi IP o i + nomi a dominio dei computer utilizzati dagli utenti che si connettono al sito, gli indirizzi in notazione URI (Uniform Resource Identifier) + delle risorse richieste, l'orario della richiesta, il metodo utilizzato nel sottoporre la richiesta al server, la dimensione del file ottenuto + in risposta, il codice numerico indicante lo stato della risposta data dal server (buon fine, errore, ecc.) ed altri parametri relativi al + sistema operativo e all'ambiente informatico dell'utente. - We use the following types of cookies: + I suddetti dati sono necessari per la fruizione della navigazione del sito. Questi dati vengono conservati dal provider per il tempo + strettamente necessario. I dati potrebbero essere utilizzati per l'accertamento di responsabilità in caso di ipotetici reati informatici ai + danni del sito. + + + Modalità del trattamento + + I dati personali di navigazione sono trattati con strumenti automatizzati per il tempo strettamente necessario a conseguire gli scopi per cui + sono stati raccolti. I dati personali di contatto sono trattati con strumenti cartacei e informatici e vengono conservati fino a completa + esecuzione del rapporto precontrattuale e di quello contrattuale o per quanto necessario secondo termini di legge. Specifiche misure di + sicurezza sono osservate per prevenire la perdita dei dati, usi illeciti o non corretti ed accessi non autorizzati. + + + Diritti di accesso e reclamo + + Scrivendo attraverso il modulo di contatto le è garantito il diritto di: - - These are essential to enable you to use the website and its features. Without these cookies, services you have asked for cannot be - provided. + chiedere l'esistenza e l'accesso ai dati che la riguardano; + chiedere l'aggiornamento e l'integrazione dei dati forniti; + + chiedere la cancellazione dei dati personali, salva l'esistenza di un diritto del Titolare alla conservazione degli stessi - - We use Google Analytics to help us understand how visitors interact with our website. These cookies collect information about your visit to - our website, the content you viewed, the links you followed, and information about your browser, device, and IP address. We do this to - improve how our website works. + + chiedere la comunicazione dei dati personali conservati eventualmente dal Titolare o la consegna di una loro copia; + + opporsi ad operazioni di trattamento che ritenga non siano legittime o chiedere limitazioni di trattamento + + Per l'esercizio dei suddetti diritti la legittimità della sua richiesta potrà essere valutata previa verifica della sua identità. - Google Analytics - This website uses Google Analytics 4, a web analytics service provided by Google, Inc. ("Google"). Google Analytics uses cookies to help the - website analyze how users use the site. The information generated by the cookie about your use of the website will be transmitted to and - stored by Google on servers in the United States. - - - We have implemented the following measures to be GDPR compliant: - - - We have obtained your consent before processing your data through cookies - We have implemented IP address anonymization - We have disabled data sharing with Google - We have set the data retention period to the minimum required for our analysis - - - You can prevent the collection of your data by Google Analytics by declining analytics cookies in our cookie consent banner or by using the - Google Analytics Opt-out Browser Add-on available at{' '} - - https://tools.google.com/dlpage/gaoptout - - . - - - Your Rights - - Under the General Data Protection Regulation (GDPR), you have various rights in relation to your personal data, including: - - - - The right to access your personal data - The right to rectification of your personal data - The right to erasure of your personal data - The right to restrict processing of your personal data - The right to data portability - The right to object to processing of your personal data - - - Contact Us - - If you have any questions about this privacy policy or our privacy practices, please contact us at{' '} - - compagniasantoluca@gmail.com + Qualora ritenga che il trattamento abbia violato un suo diritto potrà presentare obiezioni nei confronti del Titolare utilizzando l'indirizzo + sopra indicato e anche presentando reclamo presso l'Autorità Garante{' '} + + www.garanteprivacy.it . diff --git a/src/components/templates/RouteTracker/index.tsx b/src/components/templates/RouteTracker/index.tsx index eee72d5..49e55a0 100644 --- a/src/components/templates/RouteTracker/index.tsx +++ b/src/components/templates/RouteTracker/index.tsx @@ -1,5 +1,4 @@ import { useEffect } from 'react' -import { useAnalytics } from 'use-analytics' import { Outlet, useLocation } from 'react-router-dom' /** @@ -7,11 +6,6 @@ import { Outlet, useLocation } from 'react-router-dom' */ const RouteTracker = () => { const location = useLocation() - const analytics = useAnalytics() - - useEffect(() => { - analytics.page() - }, [analytics, location]) useEffect(() => { window.scrollTo(0, 0) diff --git a/src/main.tsx b/src/main.tsx index fa544e5..8dc1f36 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -5,10 +5,8 @@ import '@fontsource/medievalsharp' // Regular import React from 'react' import ReactDOM from 'react-dom/client' -import { AnalyticsProvider } from 'use-analytics' import { ThemeProvider, CssBaseline } from '@mui/material' -import analytics from 'components/utils/analytics/index.js' import theme from 'style/theme.js' import App from './App.js' import './index.css' @@ -23,11 +21,9 @@ if (themeParam === 'light' || themeParam === 'dark' || themeParam === 'system') const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement) root.render( - - - - - - + + + + )