Usage

---
import { Header } from '~/components';
---

<Header user={Astro.locals.user} />

Props

user
User | null
required

The current user. (User)

isMinimal
boolean

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';