add astro login page
Some checks failed
Build Docker Image / run (pull_request) Failing after 31s

This commit is contained in:
2024-04-25 18:34:49 +02:00
parent b48c842e41
commit 2cc3219b30
3 changed files with 40 additions and 31 deletions

View File

@ -0,0 +1,16 @@
---
import Layout from 'layouts/Layout.astro';
import { getUser } from 'libs/AuthUtils';
const user = await getUser(Astro.cookies);
if(!user){
return Astro.redirect("/account/login");
}
---
<Layout title="Account setting">
<h1>Bonjour {user.name}</h1>
</Layout>