Skip to content

Commit

Permalink
perf(insights): integrate speed-insights (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdarchen authored Jul 12, 2024
1 parent 80afb58 commit 0030811
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@headlessui/react": "^2.1.2",
"@notionhq/client": "^2.2.15",
"@vercel/analytics": "^1.3.1",
"@vercel/speed-insights": "^1.0.12",
"aos": "^2.3.4",
"clsx": "^2.1.1",
"framer-motion": "^11.2.11",
Expand Down
31 changes: 31 additions & 0 deletions pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Header from '@/components/header/Header'
import ScreenSizeDetector from '@/components/screen-size-detector/ScreenSizeDetector'
import { WEBSITE_URL } from '@/constants/globals'
import { Analytics } from '@vercel/analytics/react'
import { SpeedInsights } from '@vercel/speed-insights/next'

import './globals.css'
import 'aos/dist/aos.css'
Expand Down Expand Up @@ -71,6 +72,7 @@ const RootLayout: FC<Props> = ({ children }) => {
{children}
</div>
<Analytics />
<SpeedInsights />
{!isProd && <ScreenSizeDetector />}
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion src/app/watch/watchResource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const WatchResource: FC<Props> = ({ resource, query, truncate = true }) => {
return (
<div className="group relative flex">
{shiny && (
<div className="absolute inset-0 z-0 rounded-lg bg-gradient-to-r from-purple-600 to-pink-600 opacity-25 blur transition duration-1000 group-hover:opacity-100 group-hover:duration-200" />
<div className="absolute -inset-2 z-0 rounded-lg bg-gradient-to-r from-purple-600 to-pink-600 opacity-25 blur transition duration-1000 group-hover:opacity-100 group-hover:duration-200 md:-inset-1" />
)}
<a
href={url}
Expand Down

0 comments on commit 0030811

Please sign in to comment.