Skip to content

Commit

Permalink
📈 Add vercel analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
zivavu committed May 24, 2024
1 parent 754dc3e commit 8a3e574
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@mui/x-date-pickers": "^7.2.0",
"@reduxjs/toolkit": "^2.2.3",
"@svgr/webpack": "^8.1.0",
"@vercel/analytics": "^1.3.1",
"algoliasearch": "^4.23.3",
"dayjs": "^1.11.10",
"emoji-regex": "^10.3.0",
Expand Down
4 changes: 3 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ import {
faXmark,
} from '@fortawesome/free-solid-svg-icons';

import { Analytics } from '@vercel/analytics/react';

import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';

import type { AppProps } from 'next/app';
Expand All @@ -61,7 +63,6 @@ import { LocalizationProvider } from '@mui/x-date-pickers';
import { ThemeProvider as NextThemesProvider } from 'next-themes';
import { Provider as StoreProvider } from 'react-redux';

import { useGetLoggedUserQuery } from '@/redux/services/loggedUserAPI';
import '@fortawesome/fontawesome-svg-core/styles.css';
const { library, config } = require('@fortawesome/fontawesome-svg-core');

Expand Down Expand Up @@ -137,6 +138,7 @@ export default function MyApp(props: EmotionAppProps) {
const { Component, emotionCache = localEmotionCache, pageProps } = props;
return (
<NextThemesProvider themes={['dark', 'light']} defaultTheme='dark'>
<Analytics />
<EmotionCacheProvider value={emotionCache}>
<ThemeModeProvider>
<LocalizationProvider dateAdapter={AdapterDayjs}>
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3656,6 +3656,13 @@
"@typescript-eslint/types" "7.7.1"
eslint-visitor-keys "^3.4.3"

"@vercel/analytics@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-1.3.1.tgz#e2b1deac1b5d14fa2e4fe36186ac5054c6385ae4"
integrity sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==
dependencies:
server-only "^0.0.1"

acorn-hammerhead@0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/acorn-hammerhead/-/acorn-hammerhead-0.6.2.tgz#3ee37498a0548593d5152a4a2f1c76884958b7f8"
Expand Down Expand Up @@ -8339,6 +8346,11 @@ semver@^7.5.3, semver@^7.5.4, semver@^7.6.0:
dependencies:
lru-cache "^6.0.0"

server-only@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e"
integrity sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==

set-cookie-parser@^2.5.1:
version "2.6.0"
resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz#131921e50f62ff1a66a461d7d62d7b21d5d15a51"
Expand Down

0 comments on commit 8a3e574

Please sign in to comment.