Add Change password link to user menu
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import Link from "next/link";
|
||||
import { signOut } from "next-auth/react";
|
||||
import { LogOut, Lightbulb } from "lucide-react";
|
||||
import { LogOut, Lightbulb, KeyRound } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DropdownMenu,
|
||||
@@ -48,6 +48,12 @@ export function TopNav({ user }: TopNavProps) {
|
||||
<DropdownMenuContent align="end">
|
||||
<div className="px-2 py-1.5 text-xs text-muted-foreground">{user.email}</div>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem asChild>
|
||||
<Link href="/change-password">
|
||||
<KeyRound className="h-4 w-4 mr-2" />
|
||||
Change password
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => signOut({ callbackUrl: "/login" })}>
|
||||
<LogOut className="h-4 w-4 mr-2" />
|
||||
Sign out
|
||||
|
||||
Reference in New Issue
Block a user