Skip to content

Commit

Permalink
Merge pull request #74 from NextCafeteria/feature/vercel-analytics
Browse files Browse the repository at this point in the history
add vercel analytics
  • Loading branch information
vietanhdev committed Aug 17, 2023
2 parents a801edd + f6c419c commit bdf4aac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@types/node": "18.14.0",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4",
"@vercel/analytics": "^1.0.1",
"accept-language": "^3.0.18",
"apexcharts": "^3.41.0",
"encoding": "^0.1.13",
Expand Down
2 changes: 2 additions & 0 deletions src/app/[lng]/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { dir } from "i18next";
import { languages } from "../i18n/settings";
import { useGetCommonSettings } from "@/lib/requests/settings";
import { usePathname } from "next/navigation";
import { Analytics } from "@vercel/analytics/react";

export async function generateStaticParams() {
return languages.map((lng) => ({ lng }));
Expand Down Expand Up @@ -107,6 +108,7 @@ export default function RootLayout({ children, params: { lng } }) {
<ToastContainer autoClose={5000} hideProgressBar />
</SessionProvider>
</SWRConfig>
<Analytics />
</body>
</html>
);
Expand Down

0 comments on commit bdf4aac

Please sign in to comment.