feat(navbar): add modular navbar components and color variables

This commit is contained in:
lila 2026-04-19 17:51:43 +02:00
parent 6dbc16f23d
commit 6c4ef371c1
7 changed files with 154 additions and 48 deletions

View file

@ -0,0 +1,26 @@
import { useNavigate } from "@tanstack/react-router";
import { signOut } from "../../lib/auth-client";
type NavLogoutProps = { name: string };
const NavLogout = ({ name }: NavLogoutProps) => {
const navigate = useNavigate();
const handleLogout = () => {
void signOut()
.then(() => void navigate({ to: "/" }))
.catch((err) => console.error("logout error:", err));
};
return (
<button
onClick={handleLogout}
className="text-sm text-(--color-text-muted) transition-colors duration-200
hover:text-(--color-primary)"
>
logout <span className="text-(--color-accent)">{name}</span>
</button>
);
};
export default NavLogout;