-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserProfileDropdown.tsx
More file actions
67 lines (61 loc) · 1.81 KB
/
UserProfileDropdown.tsx
File metadata and controls
67 lines (61 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
"use client";
import Link from "next/link";
import { UserCircle, ClipboardList, Bookmark } from "lucide-react";
import { cn } from "@/lib/utils";
interface UserProfileDropdownProps {
isOpen: boolean;
onClose: () => void;
}
// TODO update hrefs once user pages are created
export function UserProfileDropdown({ isOpen, onClose }: UserProfileDropdownProps) {
if (!isOpen) return null;
return (
<div
className={cn(
"absolute top-full right-0 z-50 mt-1 min-w-[200px]",
"bg-popover rounded-md border shadow-md",
"animate-in fade-in-0 zoom-in-95"
)}
role="menu"
>
<Link
href="/"
onClick={onClose}
className={cn(
"flex items-center gap-3 rounded-t-md px-3 py-3 text-sm",
"hover:bg-accent hover:text-accent-foreground transition-colors"
)}
role="menuitem"
>
<UserCircle className="h-5 w-5" />
<span>My Profile</span>
</Link>
<div className="text-foreground mt-1 px-3 py-1 text-xs font-bold">Selling</div>
<Link
href="/"
onClick={onClose}
className={cn(
"flex items-center gap-3 px-3 py-3 text-sm",
"hover:bg-accent hover:text-accent-foreground transition-colors"
)}
role="menuitem"
>
<ClipboardList className="h-5 w-5" />
<span>My Listings</span>
</Link>
<div className="text-foreground mt-1 px-3 py-1 text-xs font-bold">Buying</div>
<Link
href="/"
onClick={onClose}
className={cn(
"flex items-center gap-3 px-3 py-3 text-sm",
"hover:bg-accent hover:text-accent-foreground transition-colors"
)}
role="menuitem"
>
<Bookmark className="h-5 w-5" />
<span>Saved Listings</span>
</Link>
</div>
);
}