From 5531d69329324cc80ccbc28595a851b5566b4bf2 Mon Sep 17 00:00:00 2001 From: Albin Groen Date: Thu, 25 Jul 2024 10:43:36 +0200 Subject: [PATCH] infra: exchange splitbee for vercel analytics --- package-lock.json | 50 ++++++++++++++++++++++++++++++++++++----------- package.json | 2 +- pages/_app.tsx | 6 +++--- 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 72263dd..dbed4df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@heroicons/react": "^2.0.18", "@next/font": "^14.0.3", "@radix-ui/react-dropdown-menu": "^2.0.6", - "@splitbee/web": "^0.3.0", + "@vercel/analytics": "^1.3.1", "axios": "^1.6.2", "formik": "^2.4.5", "next": "^14.0.3", @@ -1270,11 +1270,6 @@ "integrity": "sha512-2/U3GXA6YiPYQDLGwtGlnNgKYBSwCFIHf8Y9LUY5VATHdtbLlU0Y1R3QoBnT0aB4qv/BEiVVsj7LJXoQCgJ2vA==", "dev": true }, - "node_modules/@splitbee/web": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@splitbee/web/-/web-0.3.0.tgz", - "integrity": "sha512-jNPDKg0GQGa4jCaBc6JQsv0NHmBA80WCwZE49nFyhcbo32WF0GyqXeice7ZApy7OUHI16bAUAzm4MOQw3gvxfQ==" - }, "node_modules/@swc/helpers": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", @@ -1729,6 +1724,26 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vercel/analytics": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.3.1.tgz", + "integrity": "sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==", + "dependencies": { + "server-only": "^0.0.1" + }, + "peerDependencies": { + "next": ">= 13", + "react": "^18 || ^19" + }, + "peerDependenciesMeta": { + "next": { + "optional": true + }, + "react": { + "optional": true + } + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -5988,6 +6003,11 @@ "randombytes": "^2.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/set-function-length": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", @@ -7628,11 +7648,6 @@ "integrity": "sha512-2/U3GXA6YiPYQDLGwtGlnNgKYBSwCFIHf8Y9LUY5VATHdtbLlU0Y1R3QoBnT0aB4qv/BEiVVsj7LJXoQCgJ2vA==", "dev": true }, - "@splitbee/web": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@splitbee/web/-/web-0.3.0.tgz", - "integrity": "sha512-jNPDKg0GQGa4jCaBc6JQsv0NHmBA80WCwZE49nFyhcbo32WF0GyqXeice7ZApy7OUHI16bAUAzm4MOQw3gvxfQ==" - }, "@swc/helpers": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", @@ -8036,6 +8051,14 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "@vercel/analytics": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.3.1.tgz", + "integrity": "sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==", + "requires": { + "server-only": "^0.0.1" + } + }, "@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -11107,6 +11130,11 @@ "randombytes": "^2.1.0" } }, + "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==" + }, "set-function-length": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", diff --git a/package.json b/package.json index 79cecee..73015cc 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@heroicons/react": "^2.0.18", "@next/font": "^14.0.3", "@radix-ui/react-dropdown-menu": "^2.0.6", - "@splitbee/web": "^0.3.0", + "@vercel/analytics": "^1.3.1", "axios": "^1.6.2", "formik": "^2.4.5", "next": "^14.0.3", diff --git a/pages/_app.tsx b/pages/_app.tsx index 8ee0c08..5223a76 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -6,7 +6,7 @@ import Seo from "../components/Seo"; import Stack from "../components/Stack"; import WelcomeModal from "../components/WelcomeModal"; import axios from "axios"; -import splitbee from "@splitbee/web"; +import { Analytics } from "@vercel/analytics/react"; import type { AppProps } from "next/app"; import { SchemaContext } from "../lib/context"; import { Toaster } from "react-hot-toast"; @@ -15,8 +15,6 @@ import { useEffect, useState } from "react"; import { useRouter } from "next/dist/client/router"; import { inter } from "../lib/font"; -splitbee.init(); - function MyApp({ Component, pageProps }: AppProps) { const router = useRouter(); @@ -146,6 +144,8 @@ function MyApp({ Component, pageProps }: AppProps) { + + ); }