import React, { useEffect, useState } from 'react'; import http from '@/api/http'; import { User } from '@/api/admin/user'; import { AdminTransformers } from '@/api/admin/transformers'; import { Menu } from '@headlessui/react'; import { ChevronDownIcon, LockClosedIcon } from '@heroicons/react/solid'; const UsersContainerV2 = () => { const [ users, setUsers ] = useState([]); useEffect(() => { document.title = 'Admin | Users'; }, []); useEffect(() => { http.get('/api/application/users') .then(({ data }) => { setUsers(data.data.map(AdminTransformers.toUser)); }) .catch(console.error); }, []); return (
{users.map(user => ( ))}
Email
{'User

{user.email}

{user.uuid}

Options
{() => ( Reset Password )} {() => ( Delete )} Resend Invite
); }; export default UsersContainerV2;