From b0d0c45147261c5bdf74c2f57444a0ca876c5aee Mon Sep 17 00:00:00 2001 From: John Yang <75066915+johnjyang@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:13:15 -0800 Subject: [PATCH] add vercel speed insights --- package.json | 5 +- .../extension/src/assets/css/no-react.css | 5 +- packages/kitchen-sink/src/index.jsx | 2 + packages/website/app/layout.tsx | 7 +- pnpm-lock.yaml | 95 +++++++------------ 5 files changed, 48 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index 5b962183..7bc5a728 100644 --- a/package.json +++ b/package.json @@ -15,5 +15,8 @@ "eslint": "^8.57.1", "prettier": "^3.3.3" }, - "packageManager": "pnpm@9.1.0" + "packageManager": "pnpm@9.1.0", + "dependencies": { + "@vercel/speed-insights": "^1.1.0" + } } diff --git a/packages/extension/src/assets/css/no-react.css b/packages/extension/src/assets/css/no-react.css index 9e220f44..2af6e8ae 100644 --- a/packages/extension/src/assets/css/no-react.css +++ b/packages/extension/src/assets/css/no-react.css @@ -1,4 +1,4 @@ -html.freeze>body { +html.freeze > body { pointer-events: none; } @@ -46,7 +46,8 @@ html.freeze #react-scan-toast { max-width: 480px; color: #fff; font-size: 12px; - font-family: Menlo, Consolas, Monaco, 'Liberation Mono', 'Lucida Console', monospace; + font-family: Menlo, Consolas, Monaco, 'Liberation Mono', 'Lucida Console', + monospace; line-height: 1.5; background: rgba(0, 0, 0, 0.95); border: 1px solid rgba(255, 255, 255, 0.1); diff --git a/packages/kitchen-sink/src/index.jsx b/packages/kitchen-sink/src/index.jsx index 8fcb3142..2faa7f37 100644 --- a/packages/kitchen-sink/src/index.jsx +++ b/packages/kitchen-sink/src/index.jsx @@ -2,6 +2,7 @@ import { scan } from 'react-scan/dist/index.mjs'; // force production build import React, { useState, createContext } from 'react'; import ReactDOMClient from 'react-dom/client'; import { Analytics } from '@vercel/analytics/react'; +import { SpeedInsights } from '@vercel/speed-insights/react'; import './styles.css'; @@ -195,6 +196,7 @@ export const Input = ({ onChange, onEnter, value }) => { ReactDOMClient.createRoot(document.getElementById('root')).render( <> + {/* */} , diff --git a/packages/website/app/layout.tsx b/packages/website/app/layout.tsx index a403e6c2..873fbb54 100644 --- a/packages/website/app/layout.tsx +++ b/packages/website/app/layout.tsx @@ -1,8 +1,8 @@ import './globals.css'; import localFont from 'next/font/local'; +import Script from 'next/script'; import Header from '../components/header'; import Footer from '../components/footer'; -import Script from 'next/script'; const geistSans = localFont({ src: './fonts/GeistVF.woff', @@ -67,7 +67,10 @@ export default function RootLayout({ -