Bestellen auf Rechnung
This commit is contained in:
@@ -15,20 +15,12 @@ if (!valid) {
|
||||
Astro.redirect("/auth/login", 302)
|
||||
}
|
||||
|
||||
|
||||
const caller = createCaller(Astro)
|
||||
|
||||
const benutzer = (await caller.user.self.GET.fetch(undefined, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
|
||||
}
|
||||
})) || {} as BenutzerClient;
|
||||
|
||||
export interface Props {
|
||||
title: string;
|
||||
user: BenutzerClient
|
||||
}
|
||||
|
||||
const { title } = Astro.props;
|
||||
const { title, user } = Astro.props;
|
||||
|
||||
const schema = JSON.stringify({
|
||||
"@context": "http://schema.org",
|
||||
@@ -107,7 +99,7 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
|
||||
</head>
|
||||
|
||||
<body class="min-h-screen grid md:grid-cols-[300px_1fr]">
|
||||
<DashboardSidebar lightTheme={lightTheme} {benutzer} client:load></DashboardSidebar>
|
||||
<DashboardSidebar lightTheme={lightTheme} benutzer={user} client:load></DashboardSidebar>
|
||||
<main class="p-4 md:p-8 overflow-auto h-screen bg-base-100 pt-20 md:!pt-24">
|
||||
<slot />
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user