diff --git a/app/[locale]/layout.js b/app/[locale]/layout.js index a7d1359..b2b2c77 100644 --- a/app/[locale]/layout.js +++ b/app/[locale]/layout.js @@ -3,6 +3,7 @@ import '@/app/globals.css' import { ThemeProvider } from "@/context/ThemeProvider"; import i18nConfig from '@/i18nConfig'; import { dir } from 'i18next'; +import { Analytics } from '@vercel/analytics/react'; const poppins = Poppins({ subsets: ["latin"], weight: "400", display: "swap" }); @@ -31,6 +32,7 @@ export default function RootLayout({ children, params: { locale } }) { {children} + diff --git a/middleware.js b/middleware.js index 2200c2b..9543013 100644 --- a/middleware.js +++ b/middleware.js @@ -7,5 +7,5 @@ export function middleware(request) { // applies this middleware only to files in the app directory export const config = { - matcher: '/((?!api|static|.*\\..*|_next).*)' + matcher: '/((?!api|static|.*\\..*|_next|_vercel).*)' }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f6d8182..498f73c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@mdx-js/react": "^3.0.0", "@next/mdx": "^14.0.4", "@types/mdx": "^2.0.10", + "@vercel/analytics": "^1.1.1", "i18next": "^23.7.15", "i18next-resources-to-backend": "^1.2.0", "next": "14.0.4", @@ -838,6 +839,14 @@ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, + "node_modules/@vercel/analytics": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.1.1.tgz", + "integrity": "sha512-+NqgNmSabg3IFfxYhrWCfB/H+RCUOCR5ExRudNG2+pcRehq628DJB5e1u1xqwpLtn4pAYii4D98w7kofORAGQA==", + "dependencies": { + "server-only": "^0.0.1" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -5645,6 +5654,11 @@ "randombytes": "^2.1.0" } }, + "node_modules/server-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", + "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==" + }, "node_modules/set-function-length": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", diff --git a/package.json b/package.json index 68928db..88b0622 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@mdx-js/react": "^3.0.0", "@next/mdx": "^14.0.4", "@types/mdx": "^2.0.10", + "@vercel/analytics": "^1.1.1", "i18next": "^23.7.15", "i18next-resources-to-backend": "^1.2.0", "next": "14.0.4",