Skip to content

Commit 48df5e5

Browse files
committed
refactor: integrate PostHog client and remove unused components
1 parent cb1b956 commit 48df5e5

File tree

8 files changed

+16
-456
lines changed

8 files changed

+16
-456
lines changed

src/frontend/index.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import React, { StrictMode } from "react";
22
import { createRoot } from "react-dom/client";
3+
4+
import posthog from "./src/utils/posthog";
35
import { PostHogProvider } from 'posthog-js/react';
6+
47
import { QueryClientProvider } from '@tanstack/react-query';
58
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
69
import { queryClient } from './src/api/queryClient';
@@ -11,12 +14,8 @@ import "./src/styles/index.scss";
1114
import type * as TExcalidraw from "@excalidraw/excalidraw";
1215

1316
import App from "./src/App";
14-
import { AuthProvider } from "./src/auth/AuthContext";
1517
import AuthGate from "./src/AuthGate";
16-
import ErrorBoundary from "./src/ErrorBoundary";
1718

18-
// PostHog is automatically initialized in ./utils/posthog.ts
19-
import "./src/utils/posthog";
2019

2120
declare global {
2221
interface Window {
@@ -30,15 +29,7 @@ async function initApp() {
3029
const { Excalidraw } = window.ExcalidrawLib;
3130
root.render(
3231
<StrictMode>
33-
34-
<ErrorBoundary>
35-
<PostHogProvider
36-
apiKey={import.meta.env.VITE_PUBLIC_POSTHOG_KEY}
37-
options={{
38-
api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST,
39-
}}
40-
>
41-
32+
<PostHogProvider client={posthog}>
4233
<QueryClientProvider client={queryClient}>
4334
<AuthGate>
4435
<App
@@ -51,7 +42,6 @@ async function initApp() {
5142
<ReactQueryDevtools initialIsOpen={false} />
5243
</QueryClientProvider>
5344
</PostHogProvider>
54-
</ErrorBoundary>
5545
</StrictMode>,
5646
);
5747
}

src/frontend/src/CapsLockOverlay.tsx

Lines changed: 0 additions & 194 deletions
This file was deleted.

src/frontend/src/ErrorBoundary.tsx

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)