Header: an account menu under the user's name
Profile, invoices, redeeming a code and logging out moved from the crowded top right and the main menu into a menu that opens from the name; on phones the name shows too (shortened), so the profile stays reachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -5,7 +5,7 @@ import { useState } from "react";
|
||||
|
||||
import { api } from "@/lib/api";
|
||||
|
||||
export function LogoutButton() {
|
||||
export function LogoutButton({ className = "btn btn-sm", role }: { className?: string; role?: "menuitem" }) {
|
||||
const router = useRouter();
|
||||
const [busy, setBusy] = useState(false);
|
||||
async function logout() {
|
||||
@@ -20,7 +20,7 @@ export function LogoutButton() {
|
||||
router.refresh();
|
||||
}
|
||||
return (
|
||||
<button type="button" className="btn btn-sm" onClick={logout} disabled={busy}>
|
||||
<button type="button" className={className} role={role} onClick={logout} disabled={busy}>
|
||||
Kilépés
|
||||
</button>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user