Add Change password link to user menu

This commit is contained in:
Bonna Moon
2026-06-29 17:18:58 -05:00
parent 8ec43f3561
commit f483630419

View File

@@ -2,7 +2,7 @@
import Link from "next/link"; import Link from "next/link";
import { signOut } from "next-auth/react"; 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 { Button } from "@/components/ui/button";
import { import {
DropdownMenu, DropdownMenu,
@@ -48,6 +48,12 @@ export function TopNav({ user }: TopNavProps) {
<DropdownMenuContent align="end"> <DropdownMenuContent align="end">
<div className="px-2 py-1.5 text-xs text-muted-foreground">{user.email}</div> <div className="px-2 py-1.5 text-xs text-muted-foreground">{user.email}</div>
<DropdownMenuSeparator /> <DropdownMenuSeparator />
<DropdownMenuItem asChild>
<Link href="/change-password">
<KeyRound className="h-4 w-4 mr-2" />
Change password
</Link>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => signOut({ callbackUrl: "/login" })}> <DropdownMenuItem onClick={() => signOut({ callbackUrl: "/login" })}>
<LogOut className="h-4 w-4 mr-2" /> <LogOut className="h-4 w-4 mr-2" />
Sign out Sign out