diff --git a/src/components/Header.astro b/src/components/Header.astro index 33a0b4c..eeb2cf3 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,7 +1,15 @@ --- import { site } from '../data/site'; import { t, contentImageUrl } from '../lib/content'; +interface Props { + user: { username: string; role: string } | null; + showTags: boolean; + canTags: boolean; +} +const { user, canTags } = Astro.props; const path = Astro.url.pathname; +const loginHref = `/login?next=${encodeURIComponent(path)}`; +const areaHref = user?.role === 'superuser' ? '/admin/content' : '/admin'; ---