Vercel analytics support (#1035)

This commit is contained in:
Nabarun 2023-06-16 11:55:55 +05:30 committed by GitHub
parent 7aeb9de3d9
commit cd284bef28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -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",

7
pnpm-lock.yaml generated
View File

@ -26,6 +26,9 @@ dependencies:
'@tailwindcss/line-clamp':
specifier: ^0.4.2
version: 0.4.2(tailwindcss@3.2.4)
'@vercel/analytics':
specifier: ^1.0.1
version: 1.0.1
awesome-debounce-promise:
specifier: ^2.1.0
version: 2.1.0
@ -889,6 +892,10 @@ packages:
eslint-visitor-keys: 3.4.1
dev: true
/@vercel/analytics@1.0.1:
resolution: {integrity: sha512-Ux0c9qUfkcPqng3vrR0GTrlQdqNJ2JREn/2ydrVuKwM3RtMfF2mWX31Ijqo1opSjNAq6rK76PwtANw6kl6TAow==}
dev: false
/@xmldom/xmldom@0.7.9:
resolution: {integrity: sha512-yceMpm/xd4W2a85iqZyO09gTnHvXF6pyiWjD2jcOJs7hRoZtNNOO1eJlhHj1ixA+xip2hOyGn+LgcvLCMo5zXA==}
engines: {node: '>=10.0.0'}

View File

@ -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
@ -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} />
</>
)