import { BanIcon, DotsVerticalIcon, LockOpenIcon, PencilIcon, SupportIcon, TrashIcon } from '@heroicons/react/solid'; import { useState } from 'react'; import Checkbox from '@/components/elements/inputs/Checkbox'; import { Dropdown } from '@/components/elements/dropdown'; import { Dialog } from '@/components/elements/dialog'; import { User } from '@definitions/admin'; interface Props { user: User; selected?: boolean; onRowChange: (user: User, selected: boolean) => void; } const UserTableRow = ({ user, selected, onRowChange }: Props) => { const [visible, setVisible] = useState(false); return ( <> setVisible(false)} onConfirmed={() => { console.log('yeet'); }} > This account will be permanently deleted.
onRowChange(user, e.currentTarget.checked)} />
{'User

{user.email}

{user.uuid}

{user.isUsingTwoFactor && ( 2-FA Enabled )} }>Edit }>Reset Password } disabled={!user.isUsingTwoFactor}> Disable 2-FA }>Suspend } onClick={() => setVisible(true)} danger> Delete Account ); }; export default UserTableRow;