// Auteur : Simon-Pierre Boucher — contact@spboucher.ai
"use client";

export default function LogoutButton() {
  return (
    <button
      type="button"
      className="btn btn-ghost"
      onClick={async () => {
        await fetch("/api/auth/logout", { method: "POST" });
        window.location.href = "/";
      }}
    >
      Se déconnecter
    </button>
  );
}
