import { Checkbox } from '@/components/elements/inputs'; import { Dropdown } from '@/components/elements/dropdown'; import { BanIcon, DotsVerticalIcon, LockOpenIcon, PencilIcon, SupportIcon, TrashIcon } from '@heroicons/react/solid'; import React, { useState } from 'react'; import { User } from '@definitions/admin'; import { Dialog } from '@/components/elements/dialog'; import { Button } from '@/components/elements/button/index'; 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)}> This account will be permanently deleted. setVisible(false)} > Cancel Delete
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;