🧹 Remove vercel analytics (#856)

This commit is contained in:
Luke Vella 2023-09-14 16:27:09 +01:00 committed by GitHub
parent a630783209
commit 8ea8ae18b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 12 deletions

View file

@ -32,7 +32,6 @@
"@svgr/webpack": "^6.5.1",
"@tailwindcss/typography": "^0.5.9",
"@tanstack/react-table": "^8.9.1",
"@vercel/analytics": "^0.1.8",
"@vercel/og": "^0.5.13",
"accept-language-parser": "^1.5.0",
"autoprefixer": "^10.4.13",

View file

@ -4,7 +4,6 @@ import "../style.css";
import { trpc, UserSession } from "@rallly/backend/next/trpc/client";
import { TooltipProvider } from "@rallly/ui/tooltip";
import { inject } from "@vercel/analytics";
import { domMax, LazyMotion } from "framer-motion";
import { NextPage } from "next";
import { AppProps } from "next/app";
@ -35,13 +34,6 @@ type AppPropsWithLayout = AppProps<PageProps> & {
};
const MyApp: NextPage<AppPropsWithLayout> = ({ Component, pageProps }) => {
React.useEffect(() => {
if (process.env.NEXT_PUBLIC_ENABLE_ANALYTICS) {
// calling inject directly to avoid having this run for self-hosted instances
inject({ debug: false });
}
}, []);
if (process.env.NEXT_PUBLIC_MAINTENANCE_MODE === "1") {
return <Maintenance />;
}