---
import Layout from 'layouts/PageLayout.astro';
//import Layout from 'layouts/Layout.astro';
import PocketBase from 'pocketbase'


const pb = Astro.locals.pb
const auth = pb.authStore
const user = auth.model

if(!auth.isValid){
    return Astro.redirect("/account/login");
}

const metadata = {
  title: 'Account',
  ignoreTitleTemplate: true,
};
---

<Layout metadata={metadata}>
    <h1>Bonjour {user!.username}</h1>
</Layout>
