MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / UserMenu

Function UserMenu

webapp/src/components/nav/UserMenu.tsx:11–33  ·  view source on GitHub ↗
({user}: Props)

Source from the content-addressed store, hash-verified

9 user: User;
10}
11export default function UserMenu({user}: Props) {
12 return (
13 <Dropdown>
14 <DropdownTrigger>
15 <div className="flex items-center gap-2 cursor-pointer">
16 <Avatar suppressHydrationWarning color='secondary' size='sm' name={user.displayName?.charAt(0)} />
17 {user.displayName}
18 </div>
19 </DropdownTrigger>
20 <DropdownMenu aria-label="Static Actions">
21 <DropdownItem href={`/profiles/${user.id}`} key="edit">Edit Profile</DropdownItem>
22 <DropdownItem
23 onClick={() => signOut({redirectTo: '/'})}
24 key="logout"
25 className="text-danger"
26 color="danger"
27 >
28 Sign out
29 </DropdownItem>
30 </DropdownMenu>
31 </Dropdown>
32 );
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…