Files
tabletten/components/LogoutButton.tsx
2026-03-11 20:33:19 +01:00

24 lines
514 B
TypeScript

'use client';
import { logout } from '@/app/login/actions';
interface LogoutButtonProps {
className?: string;
children?: React.ReactNode;
}
export default function LogoutButton({ className, children }: LogoutButtonProps) {
const handleLogout = async () => {
await logout();
};
return (
<button
onClick={handleLogout}
className={className || 'px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-lg transition-colors'}
>
{children || 'Abmelden'}
</button>
);
}