Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { TabManager } from "@/components/TabManager";
import { TabContent } from "@/components/TabContent";
import { useTabState } from "@/hooks/useTabState";
import { useAppLifecycle, useTrackEvent } from "@/hooks";
import { AnalyticsConsent } from "@/components/AnalyticsConsent";
import { StartupIntro } from "@/components/StartupIntro";

type View =
Expand Down Expand Up @@ -531,6 +532,7 @@ function App() {
<OutputCacheProvider>
<TabProvider>
<AppContent />
<AnalyticsConsent />
<StartupIntro visible={showIntro} />
</TabProvider>
</OutputCacheProvider>
Expand Down
16 changes: 8 additions & 8 deletions src/lib/analytics/consent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export class ConsentManager {
} else {
// Initialize with default settings
this.settings = {
enabled: true,
hasConsented: true,
enabled: false,
hasConsented: false,
};
}

Expand All @@ -41,15 +41,15 @@ export class ConsentManager {
}

return this.settings || {
enabled: true,
hasConsented: true,
enabled: false,
hasConsented: false,
};
} catch (error) {
console.error('Failed to initialize consent manager:', error);
// Return default settings on error
return {
enabled: true,
hasConsented: true,
enabled: false,
hasConsented: false,
};
}
}
Expand Down Expand Up @@ -82,8 +82,8 @@ export class ConsentManager {

// Reset settings with new anonymous ID
this.settings = {
enabled: true,
hasConsented: true,
enabled: false,
hasConsented: false,
userId: this.generateAnonymousId(),
sessionId: this.generateSessionId(),
};
Expand Down