Skip to content

Commit

Permalink
Vercel analytics support (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
NabarunKar authored Jun 16, 2023
1 parent 7aeb9de commit cd284be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@fortawesome/react-fontawesome": "^0.2.0",
"@headlessui/react": "^1.7.8",
"@tailwindcss/line-clamp": "^0.4.2",
"@vercel/analytics": "^1.0.1",
"awesome-debounce-promise": "^2.1.0",
"axios": "^1.2.6",
"cors": "^2.8.5",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import '@fortawesome/fontawesome-svg-core/styles.css'

import '../styles/globals.css'
import '../styles/markdown-github.css'
import { Analytics } from '@vercel/analytics/react';

// Require had to be used to prevent SSR failure in Next.js
// Related discussion: https://github.com/FortAwesome/Font-Awesome/issues/19348
Expand Down Expand Up @@ -123,6 +124,7 @@ function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<NextNProgress height={1} color="rgb(156, 163, 175, 0.9)" options={{ showSpinner: false }} />
<Analytics />
<Component {...pageProps} />
</>
)
Expand Down

0 comments on commit cd284be

Please sign in to comment.