import { useState, useContext, useEffect } from 'react'; import { ApiContext } from '../../utils/api_context'; export const Admin = () => { const [users, setUsers] = useState([]); const api = useContext(ApiContext); useEffect(async () => { const { users } = await api.get('/users'); setUsers(users); }, []); return (

Users

{users.map((user) => (
{user.firstName} {user.lastName}
))}
); };