Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(ui): add user.email to userNav menu

Marc Klingen0cea7a516809
diff --git a/web/src/components/layouts/layout.tsx b/web/src/components/layouts/layout.tsx
index 3d4a368a62..0f94a0ec34 100644
--- a/web/src/components/layouts/layout.tsx
+++ b/web/src/components/layouts/layout.tsx
@@ -309,8 +309,8 @@ export default function Layout(props: PropsWithChildren) {
</ul>
</nav>
- <Menu as="div" className="relative left-1">
- <Menu.Button className="flex w-full items-center gap-x-4 p-1.5 py-3 pl-6 pr-10 text-sm font-semibold leading-6 text-gray-900 hover:bg-gray-50">
+ <Menu as="div" className="relative">
+ <Menu.Button className="flex w-full items-center gap-x-4 overflow-hidden p-1.5 py-3 pl-6 pr-10 text-sm font-semibold leading-6 text-gray-900 hover:bg-gray-50">
<span className="sr-only">Open user menu</span>
<Avatar className="h-8 w-8">
<AvatarImage src={session.data?.user?.image ?? undefined} />
@@ -342,7 +342,10 @@ export default function Layout(props: PropsWithChildren) {
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
- <Menu.Items className="absolute -top-full right-0 z-10 mt-2.5 w-32 rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none">
+ <Menu.Items className="absolute -top-full right-0 z-10 mt-2.5 rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none">
+ <span className="mb-1 block border-b px-3 pb-2 text-sm leading-6 text-gray-500">
+ {session.data?.user?.email}
+ </span>
{userNavigation.map((item) => (
<Menu.Item key={item.name}>
{({ active }) => (
@@ -403,7 +406,10 @@ export default function Layout(props: PropsWithChildren) {
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
- <Menu.Items className="absolute right-0 z-10 mt-2.5 w-32 rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none">
+ <Menu.Items className="absolute right-0 z-10 mt-2.5 rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none">
+ <span className="mb-1 block border-b px-3 pb-2 text-sm leading-6 text-gray-500">
+ {session.data?.user?.email}
+ </span>
{userNavigation.map((item) => (
<Menu.Item key={item.name}>
{({ active }) => (