# Review package: 6b85872..71cd162
## Commits
71cd162 feat(header): identità utente SSR, link Accedi / menu utente
## Files changed
src/components/Header.astro | 33 +++++++++++++++++++++++++++++++++
src/layouts/Base.astro | 15 +++++++--------
2 files changed, 40 insertions(+), 8 deletions(-)
## Diff
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,23 +1,47 @@
---
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';
---
+
+ {user ? (
+
+ ) : (
+ Accedi
+ )}
+