From 32a8413ca1be8a914754eb01f145ca16b2c8e3ae Mon Sep 17 00:00:00 2001 From: Ishaan Dey Date: Thu, 9 May 2024 00:56:30 -0700 Subject: [PATCH] add analytics --- backend/server/src/utils.ts | 2 -- frontend/app/layout.tsx | 22 ++++++++++++---------- frontend/package-lock.json | 26 ++++++++++++++++++++++++++ frontend/package.json | 1 + 4 files changed, 39 insertions(+), 12 deletions(-) diff --git a/backend/server/src/utils.ts b/backend/server/src/utils.ts index 1595285..80bd9b8 100644 --- a/backend/server/src/utils.ts +++ b/backend/server/src/utils.ts @@ -68,8 +68,6 @@ const processFiles = async (paths: string[], id: string) => { }) ) - console.log("root", root) - return { files: root.children, fileData, diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index beaf5bd..2c4e968 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -1,20 +1,21 @@ -import type { Metadata } from "next" -import { GeistSans } from "geist/font/sans" -import { GeistMono } from "geist/font/mono" -import "./globals.css" -import { ThemeProvider } from "@/components/layout/themeProvider" -import { ClerkProvider } from "@clerk/nextjs" -import { Toaster } from "@/components/ui/sonner" +import type { Metadata } from "next"; +import { GeistSans } from "geist/font/sans"; +import { GeistMono } from "geist/font/mono"; +import "./globals.css"; +import { ThemeProvider } from "@/components/layout/themeProvider"; +import { ClerkProvider } from "@clerk/nextjs"; +import { Toaster } from "@/components/ui/sonner"; +import { Analytics } from "@vercel/analytics/react"; export const metadata: Metadata = { title: "Sandbox", description: "A collaborative, AI-powered, auto-scaling code sandbox", -} +}; export default function RootLayout({ children, }: Readonly<{ - children: React.ReactNode + children: React.ReactNode; }>) { return ( @@ -27,10 +28,11 @@ export default function RootLayout({ disableTransitionOnChange > {children} + - ) + ); } diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 8f77411..ec22d77 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -26,6 +26,7 @@ "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-switch": "^1.0.3", + "@vercel/analytics": "^1.2.2", "@xterm/addon-fit": "^0.10.0", "@xterm/xterm": "^5.5.0", "class-variance-authority": "^0.7.0", @@ -1644,6 +1645,26 @@ "@types/send": "*" } }, + "node_modules/@vercel/analytics": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.2.2.tgz", + "integrity": "sha512-X0rctVWkQV1e5Y300ehVNqpOfSOufo7ieA5PIdna8yX/U7Vjz0GFsGf4qvAhxV02uQ2CVt7GYcrFfddXXK2Y4A==", + "dependencies": { + "server-only": "^0.0.1" + }, + "peerDependencies": { + "next": ">= 13", + "react": "^18 || ^19" + }, + "peerDependenciesMeta": { + "next": { + "optional": true + }, + "react": { + "optional": true + } + } + }, "node_modules/@xterm/addon-fit": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz", @@ -3253,6 +3274,11 @@ "loose-envify": "^1.1.0" } }, + "node_modules/server-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", + "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index a6d0cd8..3d840aa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -27,6 +27,7 @@ "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-switch": "^1.0.3", + "@vercel/analytics": "^1.2.2", "@xterm/addon-fit": "^0.10.0", "@xterm/xterm": "^5.5.0", "class-variance-authority": "^0.7.0",