Show participant email in dropdown (#855)

This commit is contained in:
Luke Vella 2023-09-14 16:30:53 +01:00 committed by GitHub
parent 8ea8ae18b2
commit b79b0bf3d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,8 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuItemIconLabel,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@rallly/ui/dropdown-menu";
import {
@ -67,6 +69,17 @@ export const ParticipantDropdown = ({
{children}
</DropdownMenuTrigger>
<DropdownMenuContent align={align}>
<DropdownMenuLabel>
<div className="grid gap-0.5">
<div>{participant.name}</div>
{participant.email ? (
<div className="text-muted-foreground text-xs font-normal">
{participant.email}
</div>
) : null}
</div>
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={onEdit}>
<DropdownMenuItemIconLabel icon={PencilIcon}>
<Trans i18nKey="editVotes" />
@ -78,6 +91,7 @@ export const ParticipantDropdown = ({
</DropdownMenuItemIconLabel>
</DropdownMenuItem>
<DropdownMenuItem
className="text-rose-600"
onClick={() => setIsDeleteParticipantModalVisible(true)}
>
<DropdownMenuItemIconLabel icon={TrashIcon}>