This commit is contained in:
JOLIMAITRE Matthieu 2024-05-29 06:09:50 +02:00
parent 8b6a86f17a
commit 3aea126342
14 changed files with 205 additions and 67 deletions

View file

@ -1,9 +1,11 @@
/** @jsx jsx */
import { jsx } from "https://deno.land/x/hono@v4.3.10/middleware.ts"
import { PropsWithChildren, jsx } from "https://deno.land/x/hono@v4.3.10/middleware.ts"
import { _css } from "../../lib/utils.ts";
import { User } from "../../lib/storage.ts";
export default function Heading() {
//
export default function Heading({ username }: PropsWithChildren<{username: string | null}>) {
return (
<header style={_css({
width: "100vw",
@ -32,6 +34,7 @@ export default function Heading() {
<MenuItem name="Content" location="/home"/>
<MenuItem name="About" location="/about"/>
<MenuItem name="User" location="/user"/>
{(username !== null) && <MenuItem name={`Logout (${username})`} location="/api/logout" />}
</div>
</header>
)