From ab35477763d6d1b7feed5a2d96a313baed5e2c6e Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 26 Feb 2024 13:01:41 +0300 Subject: [PATCH] Added vercel analytics in Mainlayout component --- components/MainLayout.js | 8 +++----- package.json | 1 + pnpm-lock.yaml | 30 +++++++++++++++++++++++------- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/components/MainLayout.js b/components/MainLayout.js index 4ca46cf9..c03d7799 100644 --- a/components/MainLayout.js +++ b/components/MainLayout.js @@ -7,6 +7,7 @@ import HeaderLayout from './HeaderLayout'; import Link from 'next/link' import { NorthEast } from '@mui/icons-material'; import Image from 'next/image' +import { Analytics } from '@vercel/analytics/react'; const DelayedLoginButton = () => { const [delayed, setDelayed] = useState(false) @@ -86,12 +87,9 @@ export default function MainLayout({ children, isLoading, searchTerm, isFullWidt
0 ? classes.join(" ") : "")}> - {/* <> - {isLoading ?
-

Loading...

-
: children} - */} + { children } +
{/* Footer */} diff --git a/package.json b/package.json index 6850bdf9..c09cf07e 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@radix-ui/react-radio-group": "^0.0.19", "@radix-ui/react-tabs": "0.0.5", "@turf/turf": "^6.5.0", + "@vercel/analytics": "^1.2.2", "ag-grid-community": "^26.2.1", "ag-grid-enterprise": "^26.2.1", "ag-grid-react": "^26.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc1529c6..6c1f0a56 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,6 +68,9 @@ dependencies: '@turf/turf': specifier: ^6.5.0 version: 6.5.0 + '@vercel/analytics': + specifier: ^1.2.2 + version: 1.2.2(next@12.1.0)(react@18.2.0) ag-grid-community: specifier: ^26.2.1 version: 26.2.1 @@ -113,9 +116,6 @@ dependencies: next-cookies: specifier: ^2.0.3 version: 2.0.3 - nprogress: - specifier: ^0.2.0 - version: 0.2.0 react: specifier: ^18.2.0 version: 18.2.0 @@ -3216,6 +3216,22 @@ packages: resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==} dev: false + /@vercel/analytics@1.2.2(next@12.1.0)(react@18.2.0): + resolution: {integrity: sha512-X0rctVWkQV1e5Y300ehVNqpOfSOufo7ieA5PIdna8yX/U7Vjz0GFsGf4qvAhxV02uQ2CVt7GYcrFfddXXK2Y4A==} + peerDependencies: + next: '>= 13' + react: ^18 || ^19 + peerDependenciesMeta: + next: + optional: true + react: + optional: true + dependencies: + next: 12.1.0(@babel/core@7.23.9)(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + server-only: 0.0.1 + dev: false + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -5444,10 +5460,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /nprogress@0.2.0: - resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==} - dev: false - /nssocket@0.6.0: resolution: {integrity: sha512-a9GSOIql5IqgWJR3F/JXG4KpJTA3Z53Cj0MeMvGpglytB1nxE4PdFNC0jINe27CS7cGivoynwc054EzCcT3M3w==} engines: {node: '>= 0.10.x'} @@ -6878,6 +6890,10 @@ packages: lru-cache: 6.0.0 dev: true + /server-only@0.0.1: + resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==} + dev: false + /set-function-length@1.1.1: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} engines: {node: '>= 0.4'}