From 7dccbf90513c115970d993822dafa685d5acf979 Mon Sep 17 00:00:00 2001 From: YanYuan Date: Thu, 12 Sep 2024 16:26:23 +0800 Subject: [PATCH] feat: add google analyze --- package.json | 1 + pnpm-lock.yaml | 20 ++++++++++++++++++++ src/app/layout.tsx | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f49368d..6353fc4 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "@hookform/resolvers": "^3.3.1", "@monaco-editor/react": "^4.6.0", + "@next/third-parties": "^14.2.10", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-alert-dialog": "^1.0.4", "@radix-ui/react-aspect-ratio": "^1.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e3ea3da..efe0743 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: '@monaco-editor/react': specifier: ^4.6.0 version: 4.6.0(monaco-editor@0.48.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@next/third-parties': + specifier: ^14.2.10 + version: 14.2.10(next@14.2.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0) '@radix-ui/react-accordion': specifier: ^1.1.2 version: 1.1.2(@types/react-dom@18.2.13)(@types/react@18.2.28)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -392,6 +395,12 @@ packages: cpu: [x64] os: [win32] + '@next/third-parties@14.2.10': + resolution: {integrity: sha512-5S8+HMrPZr8+FR2aFh4Nxwo3lDQcK2Uzh4NwT6ttWdRIBqf/VLOKdoMEWrTFfmAVa1PdcuYE1u64SNCsmBh8dQ==} + peerDependencies: + next: ^13.0.0 || ^14.0.0 + react: ^18.2.0 + '@noble/curves@1.2.0': resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -2790,6 +2799,9 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + third-party-capital@1.0.20: + resolution: {integrity: sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==} + throttle-debounce@3.0.1: resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==} engines: {node: '>=10'} @@ -3112,6 +3124,12 @@ snapshots: '@next/swc-win32-x64-msvc@14.2.3': optional: true + '@next/third-parties@14.2.10(next@14.2.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)': + dependencies: + next: 14.2.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + third-party-capital: 1.0.20 + '@noble/curves@1.2.0': dependencies: '@noble/hashes': 1.3.2 @@ -5883,6 +5901,8 @@ snapshots: dependencies: any-promise: 1.3.0 + third-party-capital@1.0.20: {} + throttle-debounce@3.0.1: {} to-regex-range@5.0.1: diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 0a2e12f..540a7f0 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,7 +2,7 @@ import type { Metadata } from "next"; import "./globals.css"; import {ThemeProvider} from "next-themes"; -import { Analytics } from '@vercel/analytics/react'; +import { GoogleAnalytics } from '@next/third-parties/google' import React from "react"; @@ -27,7 +27,7 @@ export default function RootLayout({ > {children} - + );