Usage
---
import { Header } from '~/components';
---
<Header user={Astro.locals.user} />
---
import { Header } from '~/components';
---
<Header user={Astro.locals.user} />
import { Header } from '~/components';
import { getCurrentUser } from '~/core/auth/server';
export default async function Page() {
const user = await getCurrentUser();
return <Header user={user} />;
}
Props
Minimal version of the header that only includes the logo. Useful for auth pages such as sign in and sign up.
Content
To update the content of the header, edit site.name
and site.header.links
in src/config/site.ts
.
import { env } from '~/core/env';
export const site = {
name: 'StarterKit',
header: {
links: [
{
title: 'Overview',
href: '/',
target: '_self',
},
{
title: 'Pricing',
href: '/pricing',
target: '_self',
},
{
title: 'FAQs',
href: '/faqs',
target: '_self',
},
],
},
};
Types
User
import type { User } from '~/core/auth';