diff --git a/apps/docs/package.json b/apps/docs/package.json index 9f6f418..501372c 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -24,6 +24,7 @@ "@types/react": "^18.3.2", "@types/react-dom": "^18.3.0", "@types/react-highlight-words": "^0.16.7", + "@vercel/analytics": "^1.3.1", "autoprefixer": "^10.4.19", "clsx": "^2.1.1", "fast-glob": "^3.3.2", diff --git a/apps/docs/src/app/layout.tsx b/apps/docs/src/app/layout.tsx index 9295153..2b36e9e 100644 --- a/apps/docs/src/app/layout.tsx +++ b/apps/docs/src/app/layout.tsx @@ -3,6 +3,7 @@ import {Inter} from 'next/font/google'; import localFont from 'next/font/local'; import {cookies} from 'next/headers'; import clsx from 'clsx'; +import {Analytics} from '@vercel/analytics/react'; import {Providers} from '@/app/providers'; import {Layout} from '@/components/Layout'; @@ -49,6 +50,7 @@ export default function RootLayout({children}: {children: React.ReactNode}) { {children} + ); diff --git a/apps/www/package.json b/apps/www/package.json index 3e30f78..61a692c 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -17,6 +17,7 @@ "@elwood/react": "workspace:*", "@elwood/ui": "workspace:*", "@supabase/ssr": "^0.3.0", + "@vercel/analytics": "^1.3.1", "autoprefixer": "^10.4.19", "clsx": "^2.1.1", "geist": "^1.3.0", diff --git a/apps/www/src/app/layout.tsx b/apps/www/src/app/layout.tsx index b12eb52..c9809f6 100644 --- a/apps/www/src/app/layout.tsx +++ b/apps/www/src/app/layout.tsx @@ -2,6 +2,7 @@ import type {PropsWithChildren} from 'react'; import {type Metadata} from 'next'; import {cookies} from 'next/headers'; import {ElwoodThemeProvider} from '@elwood/ui'; +import {Analytics} from '@vercel/analytics/react'; import './global.css'; import '@elwood/ui/style.css'; @@ -22,6 +23,7 @@ export default function RootLayout(props: PropsWithChildren): JSX.Element { data-color-mode={themeClassName} data-color-server-theme={theme}> {props.children} + ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 50a31c1..3e96b09 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -165,6 +165,9 @@ importers: '@types/react-highlight-words': specifier: ^0.16.7 version: 0.16.7 + '@vercel/analytics': + specifier: ^1.3.1 + version: 1.3.1(next@14.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.1))(react@18.3.1) autoprefixer: specifier: ^10.4.19 version: 10.4.19(postcss@8.4.38) @@ -320,6 +323,9 @@ importers: '@supabase/ssr': specifier: ^0.3.0 version: 0.3.0(@supabase/supabase-js@2.43.3) + '@vercel/analytics': + specifier: ^1.3.1 + version: 1.3.1(next@14.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.1))(react@18.3.1) autoprefixer: specifier: ^10.4.19 version: 10.4.19(postcss@8.4.38) @@ -3736,6 +3742,17 @@ packages: '@uppy/utils@5.9.0': resolution: {integrity: sha512-9Ubddd3orCOLYjf0KobwgJ+aTrABSxk9t4X/QdM4qJHVZuMIftkaMplrViRUO+kvIBCXEZDIP2AmS060siDNGw==} + '@vercel/analytics@1.3.1': + resolution: {integrity: sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==} + peerDependencies: + next: '>= 13' + react: ^18 || ^19 + peerDependenciesMeta: + next: + optional: true + react: + optional: true + '@vercel/style-guide@6.0.0': resolution: {integrity: sha512-tu0wFINGz91EPwaT5VjSqUwbvCY9pvLach7SPG4XyfJKPU9Vku2TFa6+AyzJ4oroGbo9fK+TQhIFHrnFl0nCdg==} engines: {node: '>=18.18'} @@ -7866,6 +7883,9 @@ packages: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} engines: {node: '>= 0.8.0'} + server-only@0.0.1: + resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==} + set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} @@ -12675,6 +12695,13 @@ snapshots: lodash: 4.17.21 preact: 10.22.0 + '@vercel/analytics@1.3.1(next@14.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.1))(react@18.3.1)': + dependencies: + server-only: 0.0.1 + optionalDependencies: + next: 14.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.1) + react: 18.3.1 + '@vercel/style-guide@6.0.0(@next/eslint-plugin-next@14.2.3)(eslint@8.57.0)(jest@29.7.0)(prettier@3.2.5)(typescript@5.4.5)': dependencies: '@babel/core': 7.24.5 @@ -17884,6 +17911,8 @@ snapshots: transitivePeerDependencies: - supports-color + server-only@0.0.1: {} + set-blocking@2.0.0: optional: true