Browse Source

feat: add analytics

Yidadaa 2 years ago
parent
commit
76f851bfa6
3 changed files with 13 additions and 1 deletions
  1. 7 1
      app/page.tsx
  2. 1 0
      package.json
  3. 5 0
      yarn.lock

+ 7 - 1
app/page.tsx

@@ -1,5 +1,11 @@
 import { Home } from "./components/home";
+import { Analytics } from "@vercel/analytics/react";
 
 export default function App() {
-  return <Home />;
+  return (
+    <>
+      <Home />
+      <Analytics />
+    </>
+  );
 }

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "@types/react": "^18.0.28",
     "@types/react-dom": "^18.0.11",
     "@types/react-katex": "^3.0.0",
+    "@vercel/analytics": "^0.1.11",
     "emoji-picker-react": "^4.4.7",
     "eslint": "8.35.0",
     "eslint-config-next": "13.2.3",

+ 5 - 0
yarn.lock

@@ -1434,6 +1434,11 @@
     "@typescript-eslint/types" "5.54.1"
     eslint-visitor-keys "^3.3.0"
 
+"@vercel/analytics@^0.1.11":
+  version "0.1.11"
+  resolved "https://registry.npmmirror.com/@vercel/analytics/-/analytics-0.1.11.tgz#727a0ac655a4a89104cdea3e6925476470299428"
+  integrity sha512-mj5CPR02y0BRs1tN3oZcBNAX9a8NxsIUl9vElDPcqxnMfP0RbRc9fI9Ud7+QDg/1Izvt5uMumsr+6YsmVHcyuw==
+
 acorn-jsx@^5.3.2:
   version "5.3.2"
   resolved "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"