Add Analytics package (#46)

* Add Analytics package

Created a new analytics package with a manager to handle tracking of events and page views. The package includes a default provider that can be switched out and uses a NullAnalyticsService if no provider is registered. Additional types, scripts, and package configuration are also provided to support development.

* Add marketing components for UI package

Introduced new React components under "marketing" for the UI package. These include 'Pill', 'GradientSecondaryText', 'Hero', 'CtaButton', 'FeatureCard', 'FeatureGrid', 'FeatureShowcase', 'GradientText', 'Header', and 'SecondaryHero'. Updated 'package.json' to export these components. Replaced the implementation of 'Home', 'SiteHeader', and 'SiteFooter' with these components for cleaner code and better reusability.
This commit is contained in:
Giancarlo Buomprisco
2024-07-19 23:33:52 +08:00
committed by GitHub
parent 5ee7bacb2a
commit 86d82d889c
28 changed files with 862 additions and 417 deletions

View File

@@ -1,5 +1,7 @@
import type { User } from '@supabase/supabase-js';
import { Header } from '@kit/ui/marketing';
import { AppLogo } from '~/components/app-logo';
import { SiteHeaderAccountSection } from './site-header-account-section';
@@ -7,26 +9,10 @@ import { SiteNavigation } from './site-navigation';
export function SiteHeader(props: { user?: User | null }) {
return (
<div
className={
'site-header sticky top-0 z-10 w-full bg-background/80 py-2 backdrop-blur-md dark:bg-background/50'
}
>
<div className={'container'}>
<div className="grid h-14 grid-cols-3 items-center">
<div>
<AppLogo />
</div>
<div className={'order-first md:order-none'}>
<SiteNavigation />
</div>
<div className={'flex items-center justify-end space-x-1'}>
<SiteHeaderAccountSection user={props.user ?? null} />
</div>
</div>
</div>
</div>
<Header
logo={<AppLogo />}
navigation={<SiteNavigation />}
actions={<SiteHeaderAccountSection user={props.user ?? null} />}
/>
);
}