()
| 7 | const router = useRouter(); |
| 8 | |
| 9 | const handleLogout = async () => { |
| 10 | try { |
| 11 | const response = await fetch("/api/admin/logout", { |
| 12 | method: "POST", |
| 13 | }); |
| 14 | |
| 15 | if (response.ok) { |
| 16 | router.push("/admin/login"); |
| 17 | router.refresh(); |
| 18 | } |
| 19 | } catch (error) { |
| 20 | console.error("Logout error:", error); |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | return ( |
| 25 | <header className="bg-white shadow-sm"> |
nothing calls this directly
no outgoing calls
no test coverage detected