diff --git a/components/settings/unified/tabs/SitePrivacyTab.tsx b/components/settings/unified/tabs/SitePrivacyTab.tsx index ffc77de..d7309e2 100644 --- a/components/settings/unified/tabs/SitePrivacyTab.tsx +++ b/components/settings/unified/tabs/SitePrivacyTab.tsx @@ -73,9 +73,13 @@ export default function SitePrivacyTab({ siteId, onDirtyChange }: { siteId: stri // Track dirty state useEffect(() => { - if (!initialRef.current) return + if (!initialRef.current) { + console.log('[Privacy] dirty check skipped — no initialRef') + return + } const current = JSON.stringify({ collectPagePaths, collectReferrers, collectDeviceInfo, collectScreenRes, collectGeoData, hideUnknownLocations, dataRetention, excludedPaths }) const dirty = current !== initialRef.current + console.log('[Privacy] dirty check:', { dirty, collectPagePaths, initial: initialRef.current.substring(0, 50) }) setIsDirty(dirty) onDirtyChange?.(dirty) }, [collectPagePaths, collectReferrers, collectDeviceInfo, collectScreenRes, collectGeoData, hideUnknownLocations, dataRetention, excludedPaths, onDirtyChange]) @@ -115,7 +119,7 @@ export default function SitePrivacyTab({ siteId, onDirtyChange }: { siteId: stri
- setCollectPagePaths(v => !v)} /> + { console.log('[Privacy] toggling page paths from', collectPagePaths, 'to', !collectPagePaths); setCollectPagePaths(v => !v) }} /> setCollectReferrers(v => !v)} /> setCollectDeviceInfo(v => !v)} /> setCollectScreenRes(v => !v)} />