Skip to content

Commit 7688ce9

Browse files
committed
feat(analytics.tsx): replace Vercel Analytics with Beam Analytics
feat(layout.tsx): move Analytics script to head feat(projects/page.tsx): update featured and top projects feat(highstorm.mdx): add new project Highstorm deps(package.json): update dependencies
1 parent 74ffd5f commit 7688ce9

7 files changed

Lines changed: 277 additions & 5731 deletions

File tree

app/components/analytics.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
"use client";
2-
import { Analytics as VercelAnalytics } from "@vercel/analytics/react";
32

43
export function Analytics() {
5-
return <VercelAnalytics />;
4+
const token = process.env.NEXT_PUBLIC_BEAM_TOKEN;
5+
if (!token) {
6+
return null;
7+
}
8+
return (
9+
<script
10+
src="https://beamanalytics.b-cdn.net/beam.min.js"
11+
data-token={token}
12+
async
13+
/>
14+
);
615
}

app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ export default function RootLayout({
6262
}) {
6363
return (
6464
<html lang="en" className={[inter.variable, calSans.variable].join(" ")}>
65+
<head>
66+
<Analytics />
67+
</head>
6568
<body
6669
className={`bg-black ${
6770
process.env.NODE_ENV === "development" ? "debug-screens" : undefined
6871
}`}
6972
>
70-
<Analytics />
7173
{children}
7274
</body>
7375
</html>

app/projects/page.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export default async function ProjectsPage() {
2323
const featured = allProjects.find(
2424
(project) => project.slug === "planetfall",
2525
)!;
26-
const top2 = allProjects.find((project) => project.slug === "envshare")!;
27-
const top3 = allProjects.find((project) => project.slug === "qstash")!;
26+
const top2 = allProjects.find((project) => project.slug === "highstorm")!;
27+
const top3 = allProjects.find((project) => project.slug === "envshare")!;
2828
const sorted = allProjects
2929
.filter((p) => p.published)
3030
.filter(
@@ -56,8 +56,8 @@ export default async function ProjectsPage() {
5656
<div className="grid grid-cols-1 gap-8 mx-auto lg:grid-cols-2 ">
5757
<Card>
5858
<Link href={`/projects/${featured.slug}`}>
59-
<article className="relative h-full w-full p-4 md:p-8">
60-
<div className="flex justify-between gap-2 items-center">
59+
<article className="relative w-full h-full p-4 md:p-8">
60+
<div className="flex items-center justify-between gap-2">
6161
<div className="text-xs text-zinc-100">
6262
{featured.date ? (
6363
<time dateTime={new Date(featured.date).toISOString()}>
@@ -69,7 +69,7 @@ export default async function ProjectsPage() {
6969
<span>SOON</span>
7070
)}
7171
</div>
72-
<span className="text-zinc-500 text-xs flex items-center gap-1">
72+
<span className="flex items-center gap-1 text-xs text-zinc-500">
7373
<Eye className="w-4 h-4" />{" "}
7474
{Intl.NumberFormat("en-US", { notation: "compact" }).format(
7575
views[featured.slug] ?? 0,
@@ -79,7 +79,7 @@ export default async function ProjectsPage() {
7979

8080
<h2
8181
id="featured-post"
82-
className="mt-4 text-3xl font-bold text-zinc-100 group-hover:text-white sm:text-4xl font-display"
82+
className="mt-4 text-3xl font-bold text-zinc-100 group-hover:text-white sm:text-4xl font-display"
8383
>
8484
{featured.title}
8585
</h2>
@@ -88,7 +88,7 @@ export default async function ProjectsPage() {
8888
</p>
8989
<div className="absolute bottom-4 md:bottom-8">
9090
<Link
91-
className="text-zinc-200 hover:text-zinc-50 hidden lg:block"
91+
className="hidden text-zinc-200 hover:text-zinc-50 lg:block"
9292
href={`/projects/${featured.slug}`}
9393
>
9494
Read more <span aria-hidden="true">&rarr;</span>
@@ -98,7 +98,7 @@ export default async function ProjectsPage() {
9898
</Link>
9999
</Card>
100100

101-
<div className="flex flex-col w-full gap-8 mx-auto border-t border-gray-900/10 lg:mx-0 lg:border-t-0 ">
101+
<div className="flex flex-col w-full gap-8 mx-auto border-t border-gray-900/10 lg:mx-0 lg:border-t-0 ">
102102
{[top2, top3].map((project) => (
103103
<Card key={project.slug}>
104104
<Article project={project} views={views[project.slug] ?? 0} />
@@ -108,7 +108,7 @@ export default async function ProjectsPage() {
108108
</div>
109109
<div className="hidden w-full h-px md:block bg-zinc-800" />
110110

111-
<div className="grid grid-cols-1 gap-4 mx-auto lg:mx-0 md:grid-cols-3">
111+
<div className="grid grid-cols-1 gap-4 mx-auto lg:mx-0 md:grid-cols-3">
112112
<div className="grid grid-cols-1 gap-4">
113113
{sorted
114114
.filter((_, i) => i % 3 === 0)

content/projects/highstorm.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: highstorm.app
3+
description: Simple, fast, open source custom event tracking
4+
date: "2023-05-01"
5+
url: https://highstorm.app
6+
published: true
7+
repository: "chronark/highstorm"
8+
9+
---
10+
11+
12+
[![](https://highstorm.app/og.png)](https://highstorm.app)
13+
14+
Reduce the noise in your Slack workspace by consolidating all your event data into one place, filtering alerts by relevance, and customizing your alert settings to suit your needs.
15+
16+
###### Consolidate Events
17+
Get all your event data in one place to reduce alert noise
18+
19+
###### Stay Focused
20+
Keep your Slack workspace focused on what's important
21+
22+
###### Customizable Settings
23+
Customize your alert settings to suit your unique needs
24+
25+
###### Clear Overview
26+
Get a clear overview of all your alerts in one place

0 commit comments

Comments
 (0)