minor fixes before OSS

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-28 14:59:31 +01:00
parent d57bfa13f3
commit 40b98f36a4
9 changed files with 83 additions and 15 deletions

View File

@@ -1,13 +1,25 @@
import { Heading1, Lead2 } from './copy';
import { JoinWaitlistHero } from './join-waitlist-hero';
import { SocialProofServer } from './social-proof';
import { ALink } from '@/components/ui/button';
export function Hero() {
import { chQuery } from '@openpanel/db';
import { Heading1, Lead2 } from './copy';
export async function Hero() {
const projects = await chQuery<{ project_id: string; count: number }>(
'SELECT project_id, count(*) as count from events GROUP by project_id order by count()'
);
const projectCount = projects.length;
const eventCount = projects.reduce((acc, { count }) => acc + count, 0);
return (
<div className="relative overflow-hidden">
{/* <div className="bg-blue-50 w-2/5 h-full absolute top-0 right-0"></div> */}
<div className="container relative flex min-h-[700px] flex-col items-center gap-4 max-md:pt-32 md:h-screen md:flex-row md:gap-8">
<div className="flex-1 max-md:text-center sm:min-w-[350px] lg:min-w-[400px]">
<div className="mb-4 flex justify-center md:justify-start">
<div className="rounded-full border border-border p-2 px-4 text-sm">
NOW OPEN BETA!
</div>
</div>
<Heading1 className="mb-4 text-slate-950">
An open-source
<br />
@@ -17,8 +29,33 @@ export function Hero() {
The power of Mixpanel, the ease of Plausible and nothing from Google
Analytics 😉
</Lead2>
<JoinWaitlistHero />
<SocialProofServer className="mt-6" />
<div className="flex justify-center gap-2 md:justify-start">
<ALink
className="font-semibold"
size="lg"
href="https://dashboard.openpanel.dev"
>
Create account
</ALink>
<ALink
className="font-semibold"
size="lg"
variant="secondary"
href="https://dashboard.openpanel.dev/share/overview/ZQsEhG"
>
See demo
</ALink>
</div>
<p className="mt-2">
We have{' '}
<span className="font-semibold">{projectCount} projects</span>{' '}
receiving{' '}
<span className="font-semibold">
{new Intl.NumberFormat('en').format(eventCount)} events
</span>{' '}
in total!
</p>
</div>
<div className="mt-16 w-full md:pt-16">
<div className="flex h-[max(90vh,650px)] rounded-2xl bg-black/5 md:p-2">