I see this error with the app, reported by NextJS, please fix it. The er

This commit is contained in:
Leon Serfaty G
2025-07-18 02:59:40 +00:00
parent 0da13bce65
commit 033da94ae7
2 changed files with 11 additions and 5 deletions
+3 -5
View File
@@ -25,6 +25,7 @@ import {
} from "lucide-react" } from "lucide-react"
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { logout } from "@/lib/actions/auth";
function AdminLayout({ function AdminLayout({
children, children,
@@ -78,11 +79,8 @@ function AdminLayout({
<SidebarFooter> <SidebarFooter>
<SidebarMenu> <SidebarMenu>
<SidebarMenuItem> <SidebarMenuItem>
<form action={async () => { <form action={logout}>
'use server'; <SidebarMenuButton tooltip="Logout" type="submit">
console.log('logout not implemented');
}}>
<SidebarMenuButton tooltip="Logout">
<LogOut /> <LogOut />
<span>Logout</span> <span>Logout</span>
</SidebarMenuButton> </SidebarMenuButton>
+8
View File
@@ -0,0 +1,8 @@
'use server';
export async function logout() {
// In a real app with authentication, this would handle signing out the user.
// For now, it just logs to the console.
console.log('logout not implemented');
}