2025-04-02 20:42:47 -03:00
|
|
|
"use client";
|
|
|
|
|
2025-03-30 19:28:28 -03:00
|
|
|
import React, { useState } from 'react';
|
2025-03-30 16:42:51 -03:00
|
|
|
|
|
|
|
export function UserNav() {
|
2025-03-30 19:28:28 -03:00
|
|
|
const [open, setOpen] = useState(false);
|
2025-03-30 16:42:51 -03:00
|
|
|
|
|
|
|
return (
|
2025-03-30 19:28:28 -03:00
|
|
|
<div className="relative">
|
|
|
|
<button
|
|
|
|
onClick={() => setOpen(!open)}
|
|
|
|
className="w-8 h-8 rounded-full bg-gray-200 flex items-center justify-center"
|
|
|
|
>
|
|
|
|
U
|
|
|
|
</button>
|
|
|
|
|
|
|
|
{open && (
|
|
|
|
<div className="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-10">
|
|
|
|
<div className="p-2 border-b">
|
|
|
|
<p className="font-medium">shadcn</p>
|
|
|
|
<p className="text-sm text-gray-500">m@example.com</p>
|
|
|
|
</div>
|
|
|
|
{['Profile', 'Billing', 'Settings', 'New Team', 'Log out'].map((item) => (
|
|
|
|
<button
|
|
|
|
key={item}
|
|
|
|
className="w-full text-left px-3 py-2 hover:bg-gray-100"
|
|
|
|
>
|
|
|
|
{item}
|
|
|
|
</button>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
2025-03-30 16:42:51 -03:00
|
|
|
);
|
|
|
|
}
|