students fked up
This commit is contained in:
6
apps/admin/app/(main)/actions.ts
Normal file
6
apps/admin/app/(main)/actions.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
'use server'
|
||||
import { signOut } from "@/auth";
|
||||
|
||||
export async function signOutAction() {
|
||||
await signOut();
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
Search,
|
||||
ChevronDown
|
||||
} from 'lucide-react';
|
||||
import { signOutAction } from './actions';
|
||||
|
||||
const navLinks = [
|
||||
{
|
||||
@@ -180,6 +181,7 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={signOutAction}
|
||||
className="w-full justify-start text-red-600 hover:text-red-700 hover:bg-red-50"
|
||||
>
|
||||
<LogOut className="w-4 h-4 mr-2" />
|
||||
|
||||
Reference in New Issue
Block a user