import { DotsHorizontalIcon, UserRemoveIcon } from "@heroicons/react/outline"; import { useState } from "react"; import { useLocale } from "@lib/hooks/useLocale"; import { Member } from "@lib/member"; import { Dialog, DialogTrigger } from "@components/Dialog"; import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent"; import Avatar from "@components/ui/Avatar"; import Button from "@components/ui/Button"; import Dropdown, { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/Dropdown"; export default function MemberListItem(props: { member: Member; onActionSelect: (text: string) => void; onChange: (text: string) => void; }) { const [member] = useState(props.member); const { t } = useLocale(); return ( member && (
  • {props.member.name} {props.member.email}
    {props.member.role === "INVITEE" && ( <> {t("pending")} {t("member")} )} {props.member.role === "MEMBER" && ( {t("member")} )} {props.member.role === "OWNER" && ( {t("owner")} )}
    {/*
    */} props.onActionSelect("remove")}> {t("remove_member_confirmation_message")} {/*
    */}
  • ) ); }