Skip to content

Commit

Permalink
"Added @vercel/analytics dependency and imported Analytics component …
Browse files Browse the repository at this point in the history
…in _app.tsx"

"Added @vercel/analytics dependency and imported Analytics component in _app.tsx"
  • Loading branch information
birajrai committed Jun 28, 2024
1 parent 9ba9937 commit 5f06f36
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"lint": "next lint"
},
"dependencies": {
"@vercel/analytics": "^1.3.1",
"@vercel/speed-insights": "^1.0.12",
"autoprefixer": "latest",
"next": "latest",
Expand Down
3 changes: 3 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { TaskProvider } from '../contexts/TaskContext';
import { useState, useEffect } from 'react';
import { FaSun, FaMoon } from 'react-icons/fa';
import { SpeedInsights } from '@vercel/speed-insights/next';
import { Analytics } from '@vercel/analytics/react';

function MyApp({ Component, pageProps }: AppProps) {
const [darkMode, setDarkMode] = useState(false);

Expand Down Expand Up @@ -38,6 +40,7 @@ function MyApp({ Component, pageProps }: AppProps) {
</div>
<Component {...pageProps} />
<SpeedInsights />
<Analytics />
</TaskProvider>
);
}
Expand Down
26 changes: 26 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5f06f36

Please sign in to comment.