I see this error with the app, reported by NextJS, please fix it. The er
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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');
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user